Give gun command - Please help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Give gun command - Please help (
/showthread.php?tid=499432)
Give gun command - Please help -
ParadiseRP - 08.03.2014
Someone gotta help me .. - I got this command to give from another player to other player weapons :
Код:
CMD:gungive(playerid, params[])
{
new id, Float:X, Float:Y, Float:Z, playergun, playerammo;
playergun = GetPlayerWeapon(playerid);
playerammo = GetPlayerAmmo(playerid);
if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_WHITE,"[Usage:] /givegun [playerid/partofname].");
if(playergun < 1) return SendClientMessage(playerid, COLOR_WHITE,"[Error:] You do not have a weapon.");
if(playerammo < 1) return SendClientMessage(playerid, COLOR_WHITE,"[Error:] You do not have any ammo.");
if(playerid == id) return SendClientMessage(playerid, COLOR_WHITE,"[Error:] You can't give a weapon to yourself.");
GetPlayerPos(id, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z))
{
GiveDodWeapon(id, playergun, playerammo);
GiveDodWeapon(playerid, playergun, -playerammo);
} else return SendClientMessage(playerid, COLOR_WHITE, "[Error:] You're not close enough.");
return 1;
}
Now.. when i give another player a gun it says he is weapon cheating and it chnages his virtual world and send a message to the admins , what to do about it , how to make it work ?
Re: Give gun command - Please help -
Chrillzen - 08.03.2014
We need to see your anti-cheat code.
Re: Give gun command - Please help -
ParadiseRP - 08.03.2014
I fixed it already , thanks anyway