/onduty - 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: /onduty (
/showthread.php?tid=290491)
/onduty -
viosteaua98 - 15.10.2011
i want create a command /onduty and /off duty
/onduty command will give me skin 294 and minigun
and off duty return to back skin and no minigun ...
Re: /onduty -
Kingunit - 15.10.2011
Ain't hard. Here is the basic:
pawn Код:
new Duty[ MAX_PLAYERS ]
CMD:onduty(playerid, params[])
{
if( Duty[ playerid ] == 0 )
{
Duty[ playerid ] = 1;
SetPlayerSkin(playerid, 294);
GivePlayerWeapon(playerid, 38, 999);
// Get the player's skin and store it.
}
else
{
Duty[ playerid ] = 0;
RemovePlayerWeapons(playerid);
// Set the old players skin back.
}
return 1;
}
Command: /onduty, will automatic go offduty when you are already onduty.