27.10.2009, 18:46
This will remove all player weapons when he sit in car.
I just write this code now, and i'm not sure if it is going to work, but try it.
EDIT: - TESTED, but script won't work. It just removes your weapon when you enter the vehicle.
I just write this code now, and i'm not sure if it is going to work, but try it.
pawn Код:
new weapon_data[64][MAX_PLAYERS]; // Global variable
pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid)
{
GetPlayerWeaponData(playerid,1,weapon_data[1][playerid],weapon_data[2][playerid]);
GetPlayerWeaponData(playerid,1,weapon_data[3][playerid],weapon_data[4][playerid]);
GetPlayerWeaponData(playerid,1,weapon_data[5][playerid],weapon_data[6][playerid]);
GetPlayerWeaponData(playerid,1,weapon_data[7][playerid],weapon_data[8][playerid]);
GetPlayerWeaponData(playerid,1,weapon_data[9][playerid],weapon_data[10][playerid]);
GetPlayerWeaponData(playerid,1,weapon_data[11][playerid],weapon_data[12][playerid]);
ResetPlayerWeapons(playerid);
return 1;
}
pawn Код:
public OnPlayerExitVehicle(playerid,vehicleid)
{
GivePlayerWeapon(playerid,weapon_data[1][playerid],weapon_data[2][playerid]);
GivePlayerWeapon(playerid,weapon_data[3][playerid],weapon_data[4][playerid]);
GivePlayerWeapon(playerid,weapon_data[5][playerid],weapon_data[6][playerid]);
GivePlayerWeapon(playerid,weapon_data[7][playerid],weapon_data[8][playerid]);
GivePlayerWeapon(playerid,weapon_data[9][playerid],weapon_data[10][playerid]);
GivePlayerWeapon(playerid,weapon_data[11][playerid],weapon_data[12][playerid]);
return 1;
}