/givegunall {Command Help} -
Ryan_Michael - 28.10.2012
Okay, I got it to compile and everything but when I go IG and type /givegunall [GUNID] [Ammo] it says in the chat everyone got it but when you scroll to see your guns it does not give it to you...
Please help
Код:
CMD:givegunall(playerid, params[])
{
new playerb, gunid, ammo, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "iii", gunid, ammo))
/*if(sscanf(params, "i",*/
{
SendClientMessage(playerid, COLOR_WHITE, "/givegunall [gunid] [ammo]");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
SendClientMessage(playerid, COLOR_GREY, "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_GREY, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
SendClientMessage(playerid, COLOR_GREY, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Desert Eagle 25: Shotgun");
SendClientMessage(playerid, COLOR_GREY, "26: Sawnoff Shotgun 27: SPAS-12 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Rifle");
SendClientMessage(playerid, COLOR_GREY, "25: Shotgun 34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
SendClientMessage(playerid, COLOR_GREY, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
return 1;
}
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(gunid < 0 || gunid > 46 || gunid == 19 || gunid == 20 || gunid == 21) return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon id.");
GivePlayerWeapon(gunid, ammo, playerb);
/*format(string, sizeof(string), "%s had givin a %s to everyone with %d ammo.", RPN(playerb), RWN(gunid), ammo);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Administrator %s has given you a %s with %d ammo.", RPN(playerid), RWN(gunid), ammo);*/
format(string, sizeof(string), "Administrator %s has givin a %s to everyone with %d ammo.", RPN(playerid), RWN(gunid), ammo);
SendAdminMessage(COLOR_LIGHTRED, 1, string);
/*SendClientMessage(playerb, COLOR_WHITE, string);*/
return 1;
}
Re: /givegunall {Command Help} -
Laure - 28.10.2012
Try compiling this one
Код:
CMD:givegunall(playerid, params[])
{
new playerb, gunid, ammo, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "iii", gunid, ammo))
/*if(sscanf(params, "i",*/
{
SendClientMessage(playerid, COLOR_WHITE, "/givegunall [gunid] [ammo]");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
SendClientMessage(playerid, COLOR_GREY, "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_GREY, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
SendClientMessage(playerid, COLOR_GREY, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Desert Eagle 25: Shotgun");
SendClientMessage(playerid, COLOR_GREY, "26: Sawnoff Shotgun 27: SPAS-12 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Rifle");
SendClientMessage(playerid, COLOR_GREY, "25: Shotgun 34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
SendClientMessage(playerid, COLOR_GREY, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
return 1;
}
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(gunid < 0 || gunid > 46 || gunid == 19 || gunid == 20 || gunid == 21) return SendClientMessage(playerid, COLOR_GREY, "Invalid weapon id.");
GivePlayerWeapon(playerb, gunid, ammo);
/*format(string, sizeof(string), "%s had givin a %s to everyone with %d ammo.", RPN(playerb), RWN(gunid), ammo);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Administrator %s has given you a %s with %d ammo.", RPN(playerid), RWN(gunid), ammo);*/
format(string, sizeof(string), "Administrator %s has givin a %s to everyone with %d ammo.", RPN(playerid), RWN(gunid), ammo);
SendAdminMessage(COLOR_LIGHTRED, 1, string);
/*SendClientMessage(playerb, COLOR_WHITE, string);*/
return 1;
}
Re: /givegunall {Command Help} -
Ryan_Michael - 28.10.2012
Okay, Now it gives me the gun but then bans me for weapon hacks.
Re: /givegunall {Command Help} -
[HK]Ryder[AN] - 28.10.2012
Then fix ur anticheat
Re: /givegunall {Command Help} -
Laure - 28.10.2012
Can i see your Anti Weapon Hack code?
Re: /givegunall {Command Help} -
Ryan_Michael - 28.10.2012
Код:
// Weapon Anticheat
if(IsPlayerLoggedIn(playerid) && !GunsBeingRemoved[playerid] && FalseBan[playerid])
{
if(GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][0] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][1] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][2] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][3] &&
GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][4] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][5] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][6] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][7] &&
GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][8] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][9] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][10] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][11] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][12] &&
GetPlayerWeapon(playerid) != EventWep[0] && GetPlayerWeapon(playerid) != EventWep[1] && GetPlayerWeapon(playerid) != EventWep[2])
{
if(GetPlayerState(playerid) != PLAYER_STATE_EXIT_VEHICLE || GetPlayerState(playerid) != PLAYER_STATE_ENTER_VEHICLE_DRIVER || GetPlayerState(playerid) != PLAYER_STATE_ENTER_VEHICLE_PASSENGER)
{
if(GetPlayerWeapon(playerid) != 46)
{
new string[128];
format(string, sizeof(string), "%s has been banned by GOD, reason: Weapon Hacks (%s)", RPN(playerid), RWN(GetPlayerWeapon(playerid)));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Log("logs/ban.log", string);
// Banreason
new file[32];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "Weapon Hacks (%s)", RWN(GetPlayerWeapon(playerid)));
dini_Set(file, "BanReason", string);
dini_Set(file, "BannedBy", "AutoBan");
PlayerInfo[playerid][pBanned] = 1;
AddBan(playerid);
Kick(playerid);
}
}
}
}
if(GunsBeingRemoved[playerid]) GunsBeingRemoved[playerid] = 0;
}
return 1;
}
Re: /givegunall {Command Help} -
Laure - 28.10.2012
Код:
// Weapon Anticheat
if(IsPlayerLoggedIn(playerid) && !GunsBeingRemoved[playerid] && FalseBan[playerid])
{
if(GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][0] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][1] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][2] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][3] &&
GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][4] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][5] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][6] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][7] &&
GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][8] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][9] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][10] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][11] && GetPlayerWeapon(playerid) != PlayerInfo[playerid][pWeapon][12] &&
GetPlayerWeapon(playerid) != EventWep[0] && GetPlayerWeapon(playerid) != EventWep[1] && GetPlayerWeapon(playerid) != EventWep[2])
{
if(GetPlayerState(playerid) != PLAYER_STATE_EXIT_VEHICLE || GetPlayerState(playerid) != PLAYER_STATE_ENTER_VEHICLE_DRIVER || GetPlayerState(playerid) != PLAYER_STATE_ENTER_VEHICLE_PASSENGER)
{
if(GetPlayerWeapon(playerid) != 46)
{
new string[128];
format(string, sizeof(string), "AdmInfo: %s has been banned by GOD, reason: Weapon Hacks (%s)", RPN(playerid), RWN(GetPlayerWeapon(playerid)));
SendClientMessageToAll(COLOR_DARKRED, string);
Log("logs/ban.log", string);
// Banreason
new file[32];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "Weapon Hacks (%s)", RWN(GetPlayerWeapon(playerid)));
dini_Set(file, "BanReason", string);
dini_Set(file, "BannedBy", "AutoBan");
PlayerInfo[playerid][pBanned] = 1;
AddBan(playerid);
Kick(playerid);
}
}
}
}
if(GunsBeingRemoved[playerid]) GunsBeingRemoved[playerid] = 0;
}
return 1;
}
Re: /givegunall {Command Help} -
Ryan_Michael - 28.10.2012
Still banned me
Re: /givegunall {Command Help} -
Laure - 28.10.2012
Did you add the /givegunall yourself?
Re: /givegunall {Command Help} -
Ryan_Michael - 28.10.2012
Yes i did