19.02.2014, 17:47
Hello,i've made a Drive By System with this codes
which supposed to make the passenger only be able to hold a specific weapons (Tec9,M4,UZI and MP5) only but when a player enter a vehicle as a passenger he can hold any weapon he want Not the specific weapons only.
Can someone help me with it please ?
++ REP
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
SetPlayerArmedWeapon(playerid, 0);
if(newstate == PLAYER_STATE_ONFOOT && PLAYER_STATE_PASSENGER)
{
for( new i; i < 13; i++)
{
SetPlayerArmedWeapon(playerid, 31) && SetPlayerArmedWeapon(playerid, 29) && SetPlayerArmedWeapon(playerid, 28) && SetPlayerArmedWeapon(playerid, 32);
}
}
return 1;
}
Can someone help me with it please ?
++ REP