[Command]Setskin won't execute -
Mike861 - 24.03.2018
So this command was working alright all along till today.When i switched to 0.3.DL i saw couple of issues coming up as i switched.I do /setskin playerid skinid then i get a message that skin was changed but it won't change my skin or either anyone elses.Skin i had remains.
Command /setskin:
Код:
CMD:setskin(playerid, params[])
{
new giveplayerid, moneys1, string[256], giveplayer[25];
if (adlvl[playerid] < 4) return 0;
if (sscanf(params, "ud", giveplayerid, moneys1)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setskin [playerid] [skinid]");
if (!IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playerid, COLOR_RED, "Error: Inactive player id!");
if (moneys1 < 0 || moneys1 > 20003 || moneys1 == 74) return SendClientMessage2(playerid, COLOR_RED, "Error: Invalid skin id.");
SetPlayerSkinEx(giveplayerid, moneys1);
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
if (giveplayerid != playerid)
{
format(string, 128, "An admin has set your skin to %d.", moneys1);
SendClientMessage2(giveplayerid, COLOR_YELLOW, string);
format(string, 128, "You have set %s's skin to %d.", giveplayer, moneys1);
SendClientMessage2(playerid, COLOR_YELLOW, string);
}
else
{
format(string, 128, "You have set your skin to %d.", moneys1);
SendClientMessage2(playerid, COLOR_YELLOW, string);
}
return 1;
}
Re: [Command]Setskin won't execute -
v1k1nG - 24.03.2018
moneys1 > 20003
Wtf?
And btw show us your SetPlayerSkinEx.
Re: [Command]Setskin won't execute -
Mike861 - 24.03.2018
Quote:
Originally Posted by v1k1nG
moneys1 > 20003
Wtf?
And btw show us your SetPlayerSkinEx.
|
Isn't it obvious that the skin id is that high because im on 0.3.DL and got custom skins?Anyways, here.
Код:
SetPlayerSkinEx(playerid, skinid)
{
if (orcl[playerid][0] == 0)
{
SetPlayerSkin(playerid, skinid);
}
if (orcl[playerid][0] != 1)
{
new rand = MRandom(sizeof(rspawns));
SetSpawnInfo(playerid, NO_TEAM, skinid, rspawns[rand][0], rspawns[rand][1], rspawns[rand][2], rspawns[rand][3], -1, -1, -1, -1, -1, -1);
pinterior[playerid] = 0;
pvworld[playerid] = 0;
}
}
Re: [Command]Setskin won't execute -
v1k1nG - 24.03.2018
Sorry, I didnt mean to offend xD it's that 2003 is an huge number of skins :f
Ok did you try /kill after using the cmd? It can be that
Код:
if (orcl[playerid][0] == 0)
{
SetPlayerSkin(playerid, skinid);
}
doesnt execute and
Код:
if (orcl[playerid][0] != 1)
{
new rand = MRandom(sizeof(rspawns));
SetSpawnInfo(playerid, NO_TEAM, skinid, rspawns[rand][0], rspawns[rand][1], rspawns[rand][2], rspawns[rand][3], -1, -1, -1, -1, -1, -1);
pinterior[playerid] = 0;
pvworld[playerid] = 0;
}
does. In this case after respawn you should get the skin.