SA-MP Forums Archive
/spawnchange problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /spawnchange problem. (/showthread.php?tid=124352)



/spawnchange problem. - Razvann - 30.01.2010

Код:
	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?