06.08.2012, 17:14
Код:
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);
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;