27.09.2010, 08:55
This is a strange bug. It does not always happen.
In some time player select the list item they will die.
In some time player select the list item they will die.
pawn Код:
if(dialogid == FillSex_dialog)
{
if(response)
{
if(listitem == 0)
{
OnPlayerText(playerid,"Male");
}
if(listitem == 1)
{
OnPlayerText(playerid,"Female");
}
}
else
{
RegistrationStep[playerid] = 1;
}
}
else if(RegistrationStep[playerid] == 2)
{
new idx;
tmp = strtok(text, idx);
if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
{
PlayerInfo[playerid][pSex] = 1;
RegistrationStep[playerid] = 3;
SetPlayerSkin(playerid, 291);
PlayerInfo[playerid][pModel] = 219;
return 0;
}
else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
{
PlayerInfo[playerid][pSex] = 2;
RegistrationStep[playerid] = 3;
SetPlayerSkin(playerid, 226);
PlayerInfo[playerid][pModel] = 226;
return 0;
}
else
{
}
return 0;
}