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..