30.04.2014, 10:58
I got this CMD for /givegun and now i get this warning can anyone help
warning 202: number of arguments does not match definition in this line
""""""''strmid(giveplayer, PlayerRPName(playa), 0, MAX_PLAYER_NAME);"""""""""
warning 202: number of arguments does not match definition in this line
""""""''strmid(giveplayer, PlayerRPName(playa), 0, MAX_PLAYER_NAME);"""""""""
pawn Код:
CMD:givegun(playerid, params[])
{
new playa, gun;
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(!sscanf(params, "ui", playa, gun))
{
if(gun < 1||gun > 46) { SendClientMessage(playerid, COLOR_GRAD1, " Invalid weaponid !"); return 1; }
if(IsPlayerConnected(playa))
{
if(gun == 21)
{
SetPlayerSpecialAction(playa,SPECIAL_ACTION_USEJETPACK);
}
GivePlayerAdminGun(playa, gun);
strmid(giveplayer, PlayerRPName(playa), 0, MAX_PLAYER_NAME);
format(string, sizeof(string), " You have given gun %d to %s!", gun, giveplayer);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE, "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_WHITE, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
SendClientMessage(playerid, COLOR_WHITE, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Deagle 25: Shotgun");
SendClientMessage(playerid, COLOR_WHITE, "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_WHITE, "34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
SendClientMessage(playerid, COLOR_WHITE, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
SendClientMessage(playerid, COLOR_YELLOW,"_______________________________________");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
return 1;
}