Weapon.
#1

Код:
COMMAND:weapon(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
	new ID, Amount;
	if (sscanf(params, "ud", ID, Amount)){SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /weapon [partofname] [ammount]");return 1;}
	if (ID == INVALID_PLAYER_ID){SendClientMessage(playerid, COLOR_RED, "This player do not exist.");return 1;}
	if( ID == playerid ) { SendClientMessage( playerid, COLOR_RED,"* You can't do this."); return 1;}
	new ammo = GetPlayerAmmo(playerid);
	new weapon = GetPlayerWeapon(playerid);
I want to check player all guns slots. If my gun slot is same like player who i will give a gun is same, then i want to set my variable.

EX: i have gun M4. ( this weapon is in 6 slot i think is not important ).

Other player who i will give this weapon he have AK-47,deagle,shotgun. (AK-47 slot is same like M-4).

Then i want to set this variable:

Код:
GUNSANTICHEATS[ ID ][ GUN ID ( IT WILL BE NOW AK-47 ID ) ] = false;
GUNSANTICHEATS[ ID ][ GUN ID ( IT WILL BE NOW M-4 ID ) ] = true;
Reply
#2

anyhelp?
Reply
#3

Maybe if you will do GivePlayerWeapon(playerid,31) it will automaticly replace

+rep if i helped
Reply
#4

But i want to set variable. Because if i give player M4 and player will have with self AK-47 then he will not have a AK-47 and i want to set my variable to set this weapon to false, and M4 to true.
Reply
#5

So whats the problem? I dont really get it.
Reply
#6

Player can cheat now he can get AK-47. Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)