Can someone help me?
#1

Cand someone help me in my disarm .

When i use the command it only works on my or id 0

Код:
if(strcmp(cmd, "/disarm", true) == 0) // Reset the player's weapons
	{
		if (PlayerInfo[playerid][pAdmin] >= 1)
		{
      new giveplayerid;
      new giveplayer[MAX_PLAYER_NAME];
	    new sendername[MAX_PLAYER_NAME];
	    new giveplayername[MAX_PLAYER_NAME];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_LIGHT_BLUE, "USAGE: /disarm [playername/id]");
				SendClientMessage(playerid, COLOR_LIGHT_BLUE, "FUNCTION: Will disarm the player.");
				return 1;
			}

			if(giveplayerid != INVALID_PLAYER_ID)
			{
			  GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
				GetPlayerName(playerid, sendername, sizeof(sendername));
			  ResetPlayerWeapons(giveplayerid);
				format(string, sizeof(string), "-| Administrator %s disarmed %s |-",sendername, giveplayername);
				ABroadCast(COLOR_YELLOW,string,1);
			}
			else if(giveplayerid == INVALID_PLAYER_ID)
			{
				format(string, sizeof(string), "%d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_LIGHT_BLUE, string);
			}
		}
		else SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You are not an admin with the required level.");
		return 1;
	}
Reply


Messages In This Thread
Can someone help me? - by Nexx - 14.10.2009, 12:59
Re: Can someone help me? - by DokerJr - 14.10.2009, 13:03
Re: Can someone help me? - by SanMarinoRP - 14.10.2009, 13:03
Re: Can someone help me? - by Nexx - 14.10.2009, 13:09
Re: Can someone help me? - by yom - 14.10.2009, 13:10

Forum Jump:


Users browsing this thread: 1 Guest(s)