SA-MP Forums Archive
Whats wrong? - 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: Whats wrong? (/showthread.php?tid=78006)



Whats wrong? - Blt950 - 16.05.2009

Код:
if(strcmp(cmdtext, "/showID", true) == 0)
  {
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /showID [playerid]");
					return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
				
				new giveplayername[MAX_PLAYER_NAME];
				GetPlayerName(playerid, sendername, sizeof(sendername));
				GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
				format(string, sizeof(string), "* %s shows ID to %s", sendername, giveplayername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

				SendClientMessage(giveplayerid, COLOR_GRAD1, "_________________-Identification-______________");
				format(string, sizeof(string), "Name: %s", sendername);
				SendClientMessage(giveplayerid, COLOR_GRAD3, string);
				format(string, sizeof(string), "Age: %d", age);
				SendClientMessage(giveplayerid, COLOR_GRAD3, string);
				format(string, sizeof(string), "Sex: %s", atext);
				SendClientMessage(giveplayerid, COLOR_GRAD3, string);
				format(string, sizeof(string), "Married to: %s", married);
				SendClientMessage(giveplayerid, COLOR_GRAD3, string);
				SendClientMessage(giveplayerid, COLOR_GRAD1, "_______________________________________________");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "  That player is Offline !");
				return 1;
			}
				
		}//not connected
	  return 1;
	}
When i write /showid, it says how to use it. But when i write /showid [id], it does nothing.
Thanks if you know whats wrong