03.02.2016, 14:54
My server crash when i try to change skin what might be the problem here, is something with the ispoliceskin.
PHP код:
stock IsPoliceskin(skin, playerid)
{
if(IsACop(playerid))
if(!(280 <= skin <= 288)) return 1;
return 0;
}
PHP код:
case G_LOCKER_UNIFORM: if(response) {
new skin = strval(inputtext), iGroupID = PlayerInfo[playerid][pMember];
this line make the crash if(IsPoliceskin(skin)) return SendClientMessageEx(playerid, COLOR_LIGHTRED, "[SERVER]: You're not in LSPD so you cannot use that skin");
if(IsInvalidSkin(skin)) {
return ShowPlayerDialog(playerid, G_LOCKER_UNIFORM, DIALOG_STYLE_INPUT, arrGroupData[iGroupID][g_szGroupName],"Invalid skin specified. Choose another.", "Select", "Cancel");
}
PlayerInfo[playerid][pModel] = skin;
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);