Give gun command - Please help
#1

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 ?
Reply
#2

We need to see your anti-cheat code.
Reply
#3

I fixed it already , thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)