Jump to content
  • 0

O comanda


Razvann

Question

Am comanda /checkweapons:

	if(strcmp(cmd, "/checkweapons", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] < 1)
	    {
		    SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
		    return 1;
	    }
		tmp = strtok(cmdtext,idx);
		if (!strlen(tmp))
	    {
		    SendClientMessage(playerid, COLOR_GREY, "USAGE: /checkweapons [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;
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
	    format(string, sizeof(string), "%s's weapons are next:", giveplayer);
	    SendClientMessage(playerid, COLOR_GRAD1, string);
		for (new i=0; i<9; i++)
	    {
		    GetPlayerWeaponData(giveplayerid, i, sweapon, sammo);
		    if(sweapon != 0)
		    {
		        format(string, sizeof(string), "%d have %d with %d bullets.", i, sweapon, sammo);
		    	SendClientMessage(playerid, COLOR_GRAD1, string);
			}
	    }
		return 1;
	}

Deci, as dori sa imi arate numele armei, nu ID-ul ei, cum pot face?

ps: nu folosesc godfather acum..

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.