How to check for everyone who is in my car?
#1

How to check for everyone who is in my car?

basically when I type /radioon, I want something to check for all palyers in my car so then I can set music on for those players, Im using
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
IsRadioOn[vehicleid] = 1 //when turned on
Reply
#2

Double post (forum bug)
Reply
#3

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
    if(GetPlayerVehicle(i) == GetPlayerVehicle(playerid))
    {
        // player 'i' is in the vehicle.
    }
}
Reply
#4

Error: Undefined GetPlayerVehicle

And BTW its not a Double Post, The other post was about something else, and then it went on to vehicle variables but it hasnt been helpfull and that was like few days ago.
Reply
#5

PHP код:
for(new i=0i<MAX_PLAYERSi++)
{
    if(
GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
    {
        
// player 'i' is in the vehicle.
    
}

Reply
#6

The forum posted my last post twice at the exact same time, so I removed the second one.

Change it to GetPlayerVehicleID (my mistake).
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)