/wcheck
#3

Код:
	if(strcmp(cmd, "/wcheck", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] < 1)
		{
			SendClientMessage(playerid, COLOR_GREY, "You are not authorized");
			return 1;
		}
		tmp = strtok(cmdtext,idx);
		if (!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GREY, "[USAGE] /wcheck [playerid/partOfName]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if(giveplayerid == INVALID_PLAYER_ID)
		{
			SendClientMessage(playerid, COLOR_GREY, "That player is offline");
			return 1;
		}
		new sweapon, sammo, wname[32];
		new giveplayer[MAX_PLAYER_NAME];
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		format(string, sizeof(string), "%s has the following weapons:", giveplayer);
		SendClientMessage(playerid, COLOR_YELLOW, string);
		for(new i=0; i<13; i++)
		{
			GetPlayerWeaponData(giveplayerid, i, sweapon, sammo);
			GetWeaponName(sweapon, wname,32);
			if(sweapon != 0)
			{
				format(string, sizeof(string), "Slot: %d, WName: %s, WID: %d, Ammo: (%d)", i, wname, sweapon, sammo);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}
Reply


Messages In This Thread
/wcheck - by Agent Smith - 25.07.2009, 22:36
Re: /wcheck - by MadeMan - 25.07.2009, 22:57
Re: /wcheck - by Jefff - 25.07.2009, 22:59
Re: /wcheck - by Agent Smith - 25.07.2009, 23:02

Forum Jump:


Users browsing this thread: 1 Guest(s)