21.06.2014, 15:13
Well, I added this to OnPlayerRequestClass.
But now I have one problem. Say I have a variable which stores player's skin.
But I have GangWar system, and when a player spawns to special zone (/cw) his skin should be changed. I did /skin 24 (e.g). After respawning to normal zone (/cwoff) it gives me the skin which I chose in RequestClass. Please help me to solve this. Sorry for my bad english.
But now I have one problem. Say I have a variable which stores player's skin.
PHP Code:
new gSkin[MAX_PLAYERS];
PHP Code:
public OnPlayerRequestClass(playerid, classid)
{
gSkin[playerid] = GetPlayerSkin(playerid);
SetSpawnInfo(playerid, NO_TEAM, gSkin[playerid], 0, 0, 0, 0.0, 0, 0, 0, 0, 0, 0);
return 1;
}
PHP Code:
CMD:myskin(playerid, params[])
{
if(sscanf(params,"d",params[0]) || params[0] < 1 || params[0] == 74 || params[0] > 299) return SendClientMessage(playerid, -1, "Use: /skin [1-299]");
gSkin[playerid] = params[0];
return SetPlayerSkin(playerid, params[0]);
}