Command help!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command help!! (
/showthread.php?tid=248053)
Command help!! -
NitoPSG - 11.04.2011
I want to make a command that when someone is in the car and want nitro, he will can type /nitro and get nitro with removing 500$ from his cash, but when someone type this out of the car, he will can not take nitro and massage will appear, "You are not in a car" or when he haven;t got money a massage will tell "You have no enought money" please help me! what must i type in PAWNO
Re: Command help!! -
NitoPSG - 12.04.2011
Any help ??
Re: Command help!! -
Anastasia - 12.04.2011
Try this
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/Nos",true))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xAA3333AA,"You must be in a vehicle!");
if(GetPlayerMoney(playerid) < 500 ) return SendClientMessage(playerid,0xAA3333AA,"You don't have enough cash");
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
SendClientMessage(playerid,0x33AA33AA,"Nitro added!");
return 1;
}
return 0;
}