SA-MP Forums Archive
Skin help - 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: Skin help (/showthread.php?tid=93106)



Skin help - MB@ - 23.08.2009

Код:
}
	if (strcmp(cmdtext, "/changeskin", true, 11)==0)
	{
	  new cmd[256];
	  
	  cmd = strtok(cmdtext, idx);
		if(!strlen(cmd))
		{
	    SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /changeskin [model id number]");
			return 1;
	  }
	  new param2=strval(cmd);
	  if(param2<7)
	  {
	    SendClientMessage(playerid, 0xFFFFFFAA, "skin must be between 7 and 299");
			return 1;
		}
	  if(param2==8||param2==42||param2==65||param2==74||param2==86||param2==208||param2==289) //||74||86||208||289)
	  {
	    SendClientMessage(playerid, 0xFFFFFFAA, "This number references no skin");
			return 1;
		}
		if(param2>264 && param2<274)
	  {
	    SendClientMessage(playerid, 0xFFFFFFAA, "This number references no skin");
			return 1;
		}
		if(param2>299)
	  {
	    SendClientMessage(playerid, 0xFFFFFFAA, "skin must be between 7 and 299");
			return 1;
		}
	  SetPlayerSkin(playerid, param2);
	  return 1;
I get this eror

Код:
C:\Documents and Settings\Administrator\Desktop\Stunt-server\gamemodes\StuntWorld.pwn(616) : error 017: undefined symbol "idx"
Pls help


Re: Skin help - ronyx69 - 23.08.2009

On top of the OnPlayerCommandText:
Код:
new idx;
These should be on the top of OnPlayerCommandText too, not in the command:
Код:
new cmd[256];
cmd = strtok(cmdtext, idx);



Re: Skin help - MB@ - 23.08.2009

Thx!!