/nos? - 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: /nos? (
/showthread.php?tid=188103)
/nos? -
<Weponz> - 06.11.2010
How can i make a /nos command?
Re: /nos? -
JamesC - 06.11.2010
pawn Код:
CMD:nos(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle, 1010);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You must be in a vehicle to use this command.");
}
return 1;
}
Untested.
Re: /nos? -
Kwarde - 06.11.2010
You can make it shorter to save diskspace:
pawn Код:
CMD:nos(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
else return SendClientMessage(playerid, 0xFFFFFFFF, "You must be in a vehicle to use this command.");
}
Please note that you need the include 'zcmd' for this
Re: /nos? -
Seven. - 06.11.2010
pawn Код:
CMD:nos(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid); return SendClientMessage(playerid,red,"You must be in a vehicle to add nos to it!");
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle, 1010);
return 1;
}
Not tested but should work ;P
Re: /nos? -
<Weponz> - 06.11.2010
Thanks!!!!!!!