#1

can someone Tell Me how to Make a Vehicle Only For Vips If player Goes To that Vehicle It says : 'You Need Vip to use this car '
here my vip info :
Код:
if(PlayerInfo[playerid][pVIP] >= 1)
help please
Reply
#2

EDIT: You have already fs or u want us to make vehicle fs
Reply
#3

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        //Place your vehicle variable here
        {
            if(PlayerInfo[playerid][pVIP] >= 1)
            {
                SendClientMessage(playerid, -1, "This vehicle is only available for VIP players.");
                RemovePlayerFromVehicle(playerid);
            }
     }
}
Reply
#4

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        //Place your vehicle variable here
        {
            if(PlayerInfo[playerid][pVIP] >= 1)
            {
                SendClientMessage(playerid, -1, "This vehicle is only available for VIP players.");
                RemovePlayerFromVehicle(playerid);
            }
     }
}
i put in vehicle Variable place like this :
Код:
AddStaticVehicle(411,-1482.2827,411.8228,29.8131,267.5269,86,6); //
?
Reply
#5

pawn Код:
new vipcar:
Ongamemodeinit
pawn Код:
vipcar = AddStaticVehicle(411,-1482.2827,411.8228,29.8131,267.5269,86,6); //
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
            if(PlayerInfo[playerid][pVIP] < 1 && GetPlayerVehicleID(playerid) == vipcar)
            {
                SendClientMessage(playerid, -1, "This vehicle is only available for VIP players.");
                RemovePlayerFromVehicle(playerid);
            }
     }
}
Reply
#6

thats not working . help
Reply
#7

Then try this one:
pawn Код:
new vipcar:

Ongamemodeinit
vipcar = AddStaticVehicle(411,-1482.2827,411.8228,29.8131,267.5269,86,6); //

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
            if(PlayerInfo[playerid][pVIP] == 0 && GetPlayerVehicleID(playerid) == vipcar)
            {
                SendClientMessage(playerid, -1, "This vehicle is only available for VIP players.");
                RemovePlayerFromVehicle(playerid);
            }
     }
}
Reply
#8

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vipcar[vehicleid] && PlayerInfo[playerid][pVIP] == 0)
        {
            SendClientMessage(playerid, -1, "This vehicle is only available for VIP players.");
            RemovePlayerFromVehicle(playerid);
        }
     }
}
Give this a try
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)