Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/weapons", true) == 0 || strcmp(cmd, "/checkguns", true) == 0)
- {
- if (PlayerInfo[playerid][pAdmin] < 3)
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this comand ");
- return 1;
- }
- tmp = strtok(cmdtext,idx);
- if (!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GREY, "USAGE: /weapons [playerid/playerName]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if (giveplayerid == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is offline");
- return 1;
- }
- new x_wep,sammo;
- GetPlayerName(playerid,sendername,sizeof(sendername));
- GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
- format(string, sizeof(string), "%s has checked the weapons to %s",sendername,giveplayer);
- ABroadCast(COLOR_LIGHTRED,string,1);
- for (new i=0; i<9; i++)
- {
- GetPlayerWeaponData(giveplayerid, i, x_wep,sammo);
- if(x_wep != 0)
- {
- format(string, sizeof(string), "%d: %s (%d)", i, x_wep,sammo);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement