03.03.2010, 15:11
Код:
dcmd_givegun(playerid, params[]) { new wep,player; if(sscanf(params, "ud", player,wep)) return SCM(playerid, CMD, "Usage: /givegun [PlayerName/ID] [Weapon ID]"); if(wep == 38 || wep == 35 || wep == 36 || wep == 37 || wep == 9 || wep == 26 || wep == 39) return 1; new weapons[13][2]; for (new i = 0; i < 13; i++) { GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]); if(wep != weapons[i][0]) { SCM(playerid,LIGHTRED,"You don't have that weapon."); } else { GivePlayerWeapon(player, wep, weapons[i][1]); } } return 1; }
Result: spam + doesnt get a gun