spawnchange command
#1

So the thing is, i have a spawnchange command that lets you to choose if you want to spawn @ home or in your organization base. It's working fine unless i restart client. After reconnecting it automatically sets my spawn @ house. Any ideas how to fix it?
PHP код:
CMD:spawnchange(playeridparams[])
{
    if(
PlayerLogged[playerid] == 0) return 1;
       new 
house 0;
    for(new 
1<= TOTALHOUSE;i++)
    {
        if(!
strcmp(HouseInfo[i][hOwner],sendername(playerid),true)) house++;
    }
    if(
house != 0)
    {
        if(
SpawnChange[playerid] == trueSendClientMessage(playeridCOLOR_WHITE"Tagat jus atdzimsiet parastaja vieta!"), SpawnChange[playerid] = false;
        else 
SendClientMessage(playeridCOLOR_WHITE"Tagat jus atdzimsiet majas!"), SpawnChange[playerid] = true;
    }
    else 
SendClientMessage(playeridCOLOR_GREYPlayerDoNotHaveAtHome);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)