[HELP] Passenger shoot
#1

Hy i need a script that player who want to sit in vehicle as passenger, he didn't can shoot with deagle!!!


Can anybody make it for me? )
Reply
#2

pawn Код:
//Solution 1

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE) // if he pressed Fire
    {
        if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) != 0) // he is in vehicle and he isn't driver
        {
            SetPlayerArmedWeapon(playerid,0); //once he uses it it will be resetted
        }
    }
    return 1;
}

// Solution 2
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER && GetPlayerWeapon(playerid) == 24) // Player entered a vehicle as a driver and is armed with Deagle
    {
        SetPlayerArmedWeapon(playerid,0); //once he uses it it will be resetted
    }
    return 0;
}
Reply
#3

TOOO SRBINEEE!!! TAKO JE HVALA TI BRATE <3

Nego dal da uzmem Soluciju 2 ili Soluciju 1
Reply
#4

But Can you make it if player want to sit as a passinger (suvozac) ! And if a player hold in hand deagle, not any weapon, just deagle!!! HELP
Reply
#5

Second Solution is if he has Deagle in his hands.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)