PDA

View Full Version : /onduty


viosteaua98
15/10/2011, 11:28 PM
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 ...

Kingunit
15/10/2011, 11:34 PM
Ain't hard. Here is the basic:

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.