Need Small help Rep +
#1

Код:
        if(newstate == PLAYER_STATE_DRIVER) return GetPlayerVehicleID(playerid);
        if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
        {
            for(new passengerid = 0; passengerid < MAX_PLAYERS; passengerid++)
            {
                if(IsPlayerConnected(passengerid) && GetPlayerVehicleID(passengerid) == GetPlayerVehicleID(playerid))
                {
                    RemovePlayerFromVehicle(passengerid);
                    SendClientMessage(passengerid, 0xFF0000FF, "The driver is leaving the vehicle!");
                        }
                }
                return 1;
        }

Hello I've problem with this code ,I'm using Anti G abuse script the script work fine when driver not in vehicle but it not work fine when driver leave vehicle ..How i can Fix it ?
Reply
#2

So what's the problem ? We can't help you unless you gave us the problem.
Reply
#3

youre using outdated g-abuse system

you must use OnPlayerWeaponShot.
Reply
#4

I'm using Anti G abuse script the script work fine when driver not in vehicle but it not work fine when driver leave vehicle ..How i can Fix it ?

Dude Ryz Can you show me Example?
Reply
#5

try it.

pawn Код:
new pVehicle[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        pVehicle[playerid] = GetPlayerVehicleID(playerid);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
        for(new id; id < MAX_PLAYERS; id++)
        {
            if(IsPlayerConnected(id) && GetPlayerVehicleID(id) == pVehicle[playerid])
            {
                RemovePlayerFromVehicle(id);
                SendClientMessage(id, 0xFF0000FF, "The driver is leaving the vehicle!");
            }
        }
        pVehicle[playerid] = INVALID_VEHICLE_ID;
    }
    return 1;
}
Reply
#6

xVIP3Rx Rep ++ Pro
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)