06.08.2011, 16:46
com zcmd && sscanf:
Atenciosamente,
Falcon.
pawn Код:
CMD:mudarskin(playerid, params[])
{
static Skinid;
if(sscanf(params, "d", Skinid)) return SendClientMessage(playerid, -1, "Use: /mudarskin [skinid]");
if(PlayerInfo[playerid][EsPremiun] < 1) return SendClientMessage(playerid, 0xFF0000AA, "Somente premium pode mudar de skin.");
if(PlayerInfo[playerid][EsHumano] == 1)
{
if(Skinid == 12 || Skinid == 13 || Skinid == 14) SetPlayerSkin(playerid, Skinid);
else SendClientMessage(playerid, -1, "Skin invбlida para time dos humanos...");
}
if(PlayerInfo[playerid][EsZombie] == 1)
{
if(Skinid == 45 || Skinid == 46 || Skinid == 1474) SetPlayerSkin(playerid, Skinid);
else SendClientMessage(playerid, -1, "Skin invбlida para time dos zumbies...");
}
return 0x1;
}
Atenciosamente,
Falcon.