31.01.2013, 16:50
can u tell me or give me link any tut how to made player can't use ak47 on drive pessenger seat
new PlayerWeapon[MAX_PLAYERS][13];
new PlayerAmmo[MAX_PLAYERS][13];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for (new i = 0; i<13; i++)
{
GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerAmmo[playerid][i]);
}
ResetPlayerWeapons(playerid);
}
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
for(new i=0;i<13;i++)
{
GivePlayerWeapon(playerid,PlayerWeapon[playerid][i],PlayerAmmo[playerid][i]);
}
}
return 1;
}
pawn Код:
|
but i want when player enter on pessenger seat they can use mp5 and pistol and 9mm only 3
|
if(GetPlayerWeapon(playerid) == <id of AK>)SetPlayerArmedWeapon(playerid,0);