12.07.2011, 17:02
Here:
Quote:
if(strcmp(cmd, "/givegun", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegun [playerid/PartOfName] [weaponid]"); return 1; } new playa; new gun; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); gun = strvalEx(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ __"); SendClientMessage(playerid, COLOR_GRAD1, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana 9: Chainsaw"); SendClientMessage(playerid, COLOR_GRAD2, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade"); SendClientMessage(playerid, COLOR_GRAD3, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Deagle"); SendClientMessage(playerid, COLOR_GRAD4, "26: Sawnoff Shotgun 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Country Rifle"); SendClientMessage(playerid, COLOR_GRAD5, "25: Shotgun 34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge"); SendClientMessage(playerid, COLOR_GRAD6, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute"); SendClientMessage(playerid, COLOR_GREEN,"_____________________________________ __"); return 1; } if(gun < 1||gun > 46) { SendClientMessage(playerid, COLOR_GRAD1, " Invalid weaponid !"); return 1; } if(IsPlayerConnected(playa)) { if(gun == 21) { SetPlayerSpecialAction(playa,SPECIAL_ACTION_USEJET PACK); } else { GivePlayerAdminGun(playa, gun); } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), " You have given gun %d to %s!", gun,giveplayer); SendClientMessage(playerid, COLOR_GREY, string); } } return 1; } |