Help with the same command in 2 different scripts. [Really need help!]
#7

I guess it is, but when I add this script under my /check CMD, its crashes the server when I trying to type /check.

Код:
	if (strcmp(cmd, "/check", true) == 0)
	{
    new cmdstring[64];
	  if(IsPlayerConnected(playerid))
	  {
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /check [playerid]");
					return 1;
				}
	      giveplayerid = ReturnUser(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
				  if(giveplayerid != INVALID_PLAYER_ID)
				  {
						ShowStats(playerid,giveplayerid);
						format (cmdstring, sizeof(cmdstring), "/check2 %d", giveplayerid);
            CallRemoteFunction("OnPlayerCommandText", "is", playerid, cmdstring);
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Invalid ID.");
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Your not an administrator.");
			}
		}
		return 1;
	}
Any Ideas?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)