Jump to content
  • 0

MaxAmmo & Vehicles


Question

Posted

Salutare , as putea face la comanda maxammo sa imi dea munitie infinita doar la anumite arme? Si daca da, cum?

----------------------------------------------------------------------------------------------

Cum fac sa nu scriu toate id'urile masinilor la comanda /godcar ? Adica vreau de exemplu ca la masina cu id'ul 432

sa nu poata fi folosita comanda (eu cred ca trebuie sa scriu toate id'urile...) se poate sa fac cumva fara sa scriu toate

id'urile ? Si daca da...cum? Daca nu merge ... datimi un exemplu cum sa pun toate masinile :) Mersi.

----------------------------------------------------------------------------------------------

stock MaxAmmo(playerid)
{
	new slot, weap, ammo;
	for(slot = 0; slot < 14; slot++)
	{
    	GetPlayerWeaponData(playerid, slot, weap, ammo);
		if(IsValidWeapon(weap))
		{
		   	GivePlayerWeapon(playerid, weap, 99999);
		}
	}
	return 1;
}
CMD:godcar(playerid,params[])
{
 	if(IsPlayerAdmin(playerid) || AccInfo[playerid][Level] >= 6)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
	    	if(AccInfo[playerid][GodCar] == 0)
			{
        		AccInfo[playerid][GodCar] = 1;
   				SendCommandToAdmins(playerid,"GodCar");
            	SendClientMessage(playerid,green,"Vehicle GodMod ON");
			}
			else
			{
	            AccInfo[playerid][GodCar] = 0;
    	        SendClientMessage(playerid,red,"Vehicle GodMod OFF");
			}
			return 1;
		}
		else return SendClientMessage(playerid,red,"ERROR: You need to be in a car to use this command");
	}
	else return ErrorMessages(playerid, 5);
}

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

7 answers to this question

Recommended Posts

Posted

da , la tank si la inca 2-3 vehicule ... si la maxammo sa nu se dea maxammo la minigun , rocket si inca , cateva

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

[pawn]stock MaxAmmo(playerid)

{

    new slot, weap, ammo;

    for(slot = 0; slot < 14; slot++)

    {

    GetPlayerWeaponData(playerid, slot, weap, ammo);

        if(IsValidWeapon(weap))

        {

if(weap == /*idul armei*/)

{

GivePlayerWeapon(playerid, weap, /*munitie*/);

}

else if(weap == /*idul armei*/)

{

GivePlayerWeapon(playerid, weap, /*munitie*/);

}

else if(weap == /*idul armei*/)

{

GivePlayerWeapon(playerid, weap, /*munitie*/);

}

else if(weap == /*idul armei*/)

{

GivePlayerWeapon(playerid, weap, /*munitie*/);

} else GivePlayerWeapon(playerid, weap, 99999);

        }

    }

    return 1;

}[/pawn]

Posted

mersi , si la celalalt?

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

Le definesti:

[pawn]car[0] = CreateVehicle(...);

car[1] = CreateVehicle(...);

car[2] = CreateVehicle(...);

car[3] = CreateVehicle(...);

new vehicleid = GetPlayerVehicleID(playerid);

if(vehicleid >= car[0] || vehicleid <= car[3]) return SendClientMessage(playerid,-1,"Nu ai voie in masina"),RemovePlayerFromVehicle(playerid);[/pawn]

Posted

yo nu zic sa nu aiba voie in masina...ci sa nu poata folosi acea comanda in masina respectiva

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

yo nu zic sa nu aiba voie in masina...ci sa nu poata folosi acea comanda in masina respectiva

Si crezi ca e diferit? Scoti SendClientMessage si RemovePlayerForVehicle din verificare, iar verificarea o introduci intr-o comanda.

Nu dau mura-n gura.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.