01.11.2011, 07:59
How i can disaple when player go inside in vehicle to remove deagle but when he go out ti have again deagle
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new Weap[2];
GetPlayerWeaponData(playerid, 4, Weap[0], Weap[1]); // Get the players SMG weapon in slot 4
SetPlayerArmedWeapon(playerid, Weap[0]); // Set the player to driveby with SMG
}
return 1;
}
public OnPlayerStateChange( playerid, newstate, oldstate ) {
if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER )
SetPlayerArmedWeapon( playerid, 0 );
return 1;
}
public OnPlayerStateChange( playerid, newstate, oldstate ) {
if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER ) {
new
weap
,ammo
;
GetPlayerWeaponData( playerid, 4, weap, ammo );
#pragma unused ammo
SetPlayerArmedWeapon( playerid, weap );
}
return 1;
}