Setting skin after use of command
#10

Код:
new Duty[MAX_PLAYER_NAME];
CMD:duty(playerid, params[])
{
    if(pInfo[playerid][Adminlevel] < 1)return 0;
    new Type[5];
    new LastSkin[MAX_PLAYER_NAME];
    LastSkin[playerid] = GetPlayerSkin(playerid);
    new Float:health;
	GetPlayerHealth(playerid, health);
    if(sscanf(params, "s[5]", Type)) return SCM(playerid, orange, "Go on duty: /duty <on/off>"); 
    if(!strcmp(Type, "on", false))
    {
		Duty[playerid] = 1;
		GetPlayerName(playerid, pName, sizeof(pName));
		format(ustr, sizeof(ustr), "%s %s is ON duty.", AdminLevelName(playerid), pName);
    	SendMessageToAdmins(Lblue, ustr);
		SetPlayerSkin(playerid, 217);
		SetPlayerHealth(playerid, 100000000);
    }

    else if(!strcmp(Type, "off", false))
    {
        Duty[playerid] = 0;
		GetPlayerName(playerid, pName, sizeof(pName));
		format(ustr, sizeof(ustr), "%s %s is OFF duty.", AdminLevelName(playerid), pName);
    	SendMessageToAdmins(Lblue, ustr);
    	SetPlayerHealth(playerid, health);
    	SetPlayerSkin(playerid, LastSkin[playerid]);
    	
    }
	return 1;
}
Good luck with your command :3
Reply


Messages In This Thread
Setting skin after use of command - by LeXuZ - 03.03.2015, 21:13
Re: Setting skin after use of command - by Schneider - 03.03.2015, 21:39
Re: Setting skin after use of command - by Abagail - 03.03.2015, 21:45
Re: Setting skin after use of command - by LeXuZ - 03.03.2015, 21:53
Re : Setting skin after use of command - by Golimad - 03.03.2015, 23:22
Re: Setting skin after use of command - by LeXuZ - 05.03.2015, 16:38
Re: Setting skin after use of command - by CalvinC - 05.03.2015, 16:48
Re: Setting skin after use of command - by LeXuZ - 05.03.2015, 17:42
Re: Setting skin after use of command - by CalvinC - 05.03.2015, 17:49
Re : Setting skin after use of command - by Golimad - 05.03.2015, 20:03

Forum Jump:


Users browsing this thread: 2 Guest(s)