Littkw help with deagle
#1

How i can disaple when player go inside in vehicle to remove deagle but when he go out ti have again deagle
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon

Just set it to a fist / uzi.
Reply
#3

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new 
Weap[2];
        
GetPlayerWeaponData(playerid4Weap[0], Weap[1]); // Get the players SMG weapon in slot 4
        
SetPlayerArmedWeapon(playeridWeap[0]); // Set the player to driveby with SMG
    
}
    return 
1;

how i can make it with this
Reply
#4

ideas
Reply
#5

Change to fist:
pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )  {
    if( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER )
        SetPlayerArmedWeapon( playerid, 0 );
    return 1;
}
Change to SMG/UZI/TEC9:
pawn Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)