VIP Cars
#1

how do i make a cars for VIP only [pDonator] ?
i promise i will give +rep if u will help me.
Reply
#2

This is an example how to do it.
pawn Code:
#define MAX_VIPCARS 10

new VIPCar[MAX_VIPCARS];

public OnGameModeInIt()
{
    VIPCar[0] = AddStaticVehicleEx(451, 1.0, 2.0, 3.0, 4.0, 1, 1, 10);
    VIPCar[1] = AddStaticVehicleEx(560, 2.0, 3.0, 4.0, 5.0, 1, 1, 10);
    // and so on.
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < MAX_VIPCARS; i++)
    {
        if(vehicleid == VIPCar[i])
        {
            if(PlayerInfo[playerid][pDonator] == 0)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, -1, "You arent VIP");
            }
        }
    }
    return 1;
}
Reply
#3

Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
Reply
#4

Quote:
Originally Posted by ChuckyBabe
View Post
Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
Look at this AddStaticVehicleEx.
Put the #define anywhere ( I suggest you to put it below the #include ), and new VIPCar[MAX_VIPCARS] below the define, and you can put the AddStaticVehicleEx below your OnGameModeInit (use CTRL+F) and so on.
Reply
#5

Quote:
Originally Posted by ChuckyBabe
View Post
Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
VIPCar[1] = AddStaticVehicleEx(560 Vehicle ID, 2.0X-Coordinate, 3.0Y-Coordinate, 4.0Z-Coordinate, 5.0Angle of the car, 1Primary colour, 1Secondary colour, 10Respawn timer);
Reply
#6

PHP Code:
VIPCar[0] = AddStaticVehicleEx(4511.02.03.04.01110); 
Where is x,y,z there ? i think 451 is the vehicle id ? 1.0=x? 2.0=y and 3.0=z? what is 4.0 and 1, 1, i think 10 is respawning time ?

what is 4.0 and 1, 1,?
Reply
#7

Quote:
Originally Posted by ChuckyBabe
View Post
PHP Code:
VIPCar[0] = AddStaticVehicleEx(4511.02.03.04.01110); 
Where is x,y,z there ? i think 451 is the vehicle id ? 1.0=x? 2.0=y and 3.0=z? what is 4.0 and 1, 1, i think 10 is respawning time ?

what is 4.0 and 1, 1,?
It's in the same order as above.

4.0 is the angle of the car and 1, 1 are the colours. In this case it's a car model 451 on the coordinatess 1.0, 2.0, 3.0 with its nose faced to the direction 4.0. The car is fully white (1, 1) and respawns if nobody uses it for 10 seconds.
Reply
#8

Ok thanks )
Reply
#9

YOu're welcome, good luck with your script.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)