16.04.2009, 12:39
Quote:
Originally Posted by DeathGod
all i want is a simple /seeweap and it shows the target ids weaps
|
Quote:
if(strcmp(cmd, "/checkweaps", true) == 0) { if (PlayerInfo[playerid][pAdmin] < 1337) { SendClientMessage(playerid, COLOR_GREY, " You cannot use this command."); return 1; } tmp = strtok(cmdtext,idx); if (!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /checkweaps [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 has gun id :", 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: %d (ammo : %d)", i, sweapon, sammo); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; } |