SA-MP Forums Archive
Command ! - 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)
+--- Thread: Command ! (/showthread.php?tid=300962)



Command ! - dorperez - 02.12.2011

Hey,

I want to do that when someone type /rentcar he can type /engine but if he doesn't type /rentcar so he can't type /engine.

Tnx guys !


Re: Command ! - Kaperstone - 02.12.2011

you need zcmd for this:
pawn Код:
new RentedCar[MAX_PLAYERS];
CMD:rentcar(playerid,params[])
{
if(RentedCar[playerid] == 0)
{
RentedCar[playerid] == 1;
SendClientMessage(playerid,0x334455,"You have rented this car,you can /engine now");
}else{
SendClientMessage(playerid,0x334455,"You already rented this car!");

return 1;
}
CMD:engine(playerid,params[])
{
if(RentedCar[playerid] == 0)
{
SendClientMessage(playerid, 0x334455,"You have to rent the car first!");
}else{
// Script (if the player rented the car)
}
return 1;
}



Re: Command ! - dorperez - 02.12.2011

There is no other way except zcmd ?


Re: Command ! - Sinc - 02.12.2011

Quote:
Originally Posted by dorperez
Посмотреть сообщение
There is no other way except zcmd ?
ZCMD isn't required.