/spawnchange problem. -
Код:
if(strcmp(cmd, "/spawnchange", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPhousekey] != 255)
{
if(Spectate[playerid] != 255 && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " You are Spectating, can't change the Spawn right now !");
return 1;
}
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /spawnchange [NUMBER: 1/2]");
return 1;
}
if(strcmp(x_nr,"1",true) == 0)
{
if(SpawnChange[playerid])
{
SendClientMessage(playerid, COLOR_GREY, " You will now spawn at your Normal Place !");
SpawnChange[playerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You dont own / rent a House !");
return 1;
}
}
if(strcmp(x_nr,"2",true) == 0)
{
if(SpawnChange[playerid])
{
SendClientMessage(playerid, COLOR_GREY, " You will now spawn at your House !");
SpawnChange[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You dont own / rent a House !");
return 1;
}
}
}
return 1;
}
}
I have this, but when I type /spawnchange 2 it says "You dont own / rent a House !" but I'm an owner. Any ideas?