30.06.2014, 08:11
The following code doesn't work. It's set to show if the player is a newly registered players, and it does. But when you click on a skin or on a button, nothing happens: it just stays there, frozen. What should I do?
pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
new string[35];
if(listid == skinlist)
{
if(response)
{
format(string, 30, "{3685BA}SERVER: {FFFFFF}You have set your skin to ID %d!", modelid);
SendClientMessage(playerid, -1, string);
SetPlayerSkin(playerid, modelid);
return 1;
}
else SendClientMessage(playerid, -1, "{3685BA}SERVER: {FFFFFF}You must select a skin.");
ShowModelSelectionMenu(playerid, skinlist, "Skin Selection");
return 1;
}
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(pNewlyRegged[playerid])
{
ShowModelSelectionMenu(playerid, skinlist, "Skin Selection");
RandomSpawnLoc(playerid);
}
if(IsPlayerConnected(playerid))
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerToTeamColor(playerid);
Logged[playerid] = 1;
}
if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0)
{
SetPlayerPos(playerid, 1271.3654,181.0756,19.4705);
Logged[playerid] = 1;
}
else
{
SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
Logged[playerid] = 1;
}
return 1;
}