Help with making a score requirement system.
#1

So, I'm making a script where you need a certain amount of score to enter a aircraft, this is what I got.

Note: Im still a noob with scripting.

pawn Код:
#include <a_samp>
#include <a_colors>
#include <JunkBuster>

//Planes that require 0 score:
//Dodo
//Beagle
//Nevada
//Stuntplane
//Maverick
//Skimmer
//Cropduster
//Planes that require 20 Score:
//Shamal
//Raidence
//Cargobob
//Planes that require 40 Score:
//AT-400
//Andromada
//Leviathan
//Planes that require 60 score:
//Hydya
//Hunter
//Rustler
//Planes that are not used ingame:
//Sparow
//Seasparow
//Police Maverick
//News Maverick

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    //20 Score Aircraft
    if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 519))
    SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 563))
    SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 548))
    SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
    RemovePlayerFromVehicle(playerid);

    else

    //40 Score Aircraft
    if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 577))
    SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 592))
    SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 417))
    SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
    RemovePlayerFromVehicle(playerid);
   
    else
   
    //60 Score Aircraft
    if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 520))
    SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 592))
    SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
    RemovePlayerFromVehicle(playerid);

    else

    if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 425))
    SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
    RemovePlayerFromVehicle(playerid);
    return 1;
}
And this is what I got:

Код:
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : warning 215: expression has no effect
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Can anyone help?
Reply
#2

Anyone?
Reply
#3

i have those errors too in my topic and no one answered me yet so np dude
Reply
#4

i think u should change this < in :
pawn Код:
if(GetPlayerScore(playerid, > 20) && IsPlayerInVehicle(playerid, 519))
    SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
    RemovePlayerFromVehicle(playerid);
Reply
#5

This should work (compiled with no errors for me):

pawn Код:
//20 Score Aircraft
    if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
        RemovePlayerFromVehicle(playerid);
    }
    //40 Score Aircraft
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
        RemovePlayerFromVehicle(playerid);
    }
    //60 Score Aircraft
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
        RemovePlayerFromVehicle(playerid);
    }
As for the method you're using, I think it could be improved. You're using OnPlayerEnterVehicle which is called when the player starts to enter a vehicle. You're checking whether they're inside the vehicle when they start to enter it. The best way to check whether a player has just entered a vehicle is by checking their state, using OnPlayerStateChange:

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //The players state has changed from on foot to in a vehicle.
       
        //Check whether it's the vehicle here.
    }
    return 1;
}
Personally, I'd do the same thing using arrays to make it neater:

pawn Код:
enum cPlaneData_ENUM
{
    //enum of variables for plane data, so we can access them easier
    nScore,
    nVeh,
    szVehName[ 64 ],
};

new cPlaneData[ ][ cPlaneData_ENUM ] =
{
    //nScore, nVeh, nVehName
    //0 ,     1,    2

    { 20, 519, "Shamal"    },
    { 20, 563, "Raindance" },
    { 20, 548, "Cargobob"  },
    { 40, 577, "AT-400"    },
    { 40, 592, "Andromada" },
    { 40, 417, "Leviathan" },
    { 60, 520, "Hydra"     },
    { 60, 592, "Rustler"   },
    { 60, 425, "Hunter"    }
};

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    //The players state changed
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //They're now a driver.

        for( new i=0; i < sizeof cPlaneData; i++ )
        {
            //Loop through array for plane data

            if( IsPlayerInVehicle(playerid, cPlaneData[ i ][ nVeh ]) )
            {
                //They're in the vehicle from the array

                if( GetPlayerScore(playerid) < cPlaneData[ i ][ nScore ] )
                {
                    //If the players score is less than the defined score for this vehicle

                    new szStr[ 128 ];

                    format( szStr, sizeof szStr, "You need %d flying minutes (%d Score) to use the %s!", cPlaneData[ i ][ nScore ], cPlaneData[ i ][ nScore ], cPlaneData[ i ][ szVehName ] );

                    //Send message and remove them.
                    SendClientMessage( playerid, COLOR_RED, szStr );
                    RemovePlayerFromVehicle( playerid );
                }

            }

        }
    }
    return 1;
}
Reply
#6

None of the folowing work:

pawn Код:
enum cPlaneData_ENUM
{
    //enum of variables for plane data, so we can access them easier
    nScore,
    nVeh,
    szVehName[ 64 ],
};

new cPlaneData[ ][ cPlaneData_ENUM ] =
{
    //nScore, nVeh, nVehName
    //0 ,     1,    2

    { 20, 519, "Shamal"    },
    { 20, 563, "Raindance" },
    { 20, 548, "Cargobob"  },
    { 40, 577, "AT-400"    },
    { 40, 592, "Andromada" },
    { 40, 417, "Leviathan" },
    { 60, 520, "Hydra"     },
    { 60, 592, "Rustler"   },
    { 60, 425, "Hunter"    }
};

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    //The players state changed
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //They're now a driver.

        for( new i=0; i < sizeof cPlaneData; i++ )
        {
            //Loop through array for plane data

            if( IsPlayerInVehicle(playerid, cPlaneData[ i ][ nVeh ]) )
            {
                //They're in the vehicle from the array

                if( GetPlayerScore(playerid) < cPlaneData[ i ][ nScore ] )
                {
                    //If the players score is less than the defined score for this vehicle

                    new szStr[ 128 ];

                    format( szStr, sizeof szStr, "You need %d flying minutes (%d Score) to use the %s!", cPlaneData[ i ][ nScore ], cPlaneData[ i ][ nScore ], cPlaneData[ i ][ szVehName ] );

                    //Send message and remove them.
                    SendClientMessage( playerid, COLOR_RED, szStr );
                    RemovePlayerFromVehicle( playerid );
                }

            }

        }
    }
    return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    //20 Score Aircraft
    if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
        RemovePlayerFromVehicle(playerid);
    }
    //40 Score Aircraft
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
        RemovePlayerFromVehicle(playerid);
    }
    //60 Score Aircraft
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
        RemovePlayerFromVehicle(playerid);
    }
    return 1;
}
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
    //20 Score Aircraft
    if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
        RemovePlayerFromVehicle(playerid);
    }
    //40 Score Aircraft
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
        RemovePlayerFromVehicle(playerid);
    }
    //60 Score Aircraft
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
        RemovePlayerFromVehicle(playerid);
    }
    else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
    {
        SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
        RemovePlayerFromVehicle(playerid);
    }
    return 1;
    }
    return 0;
}
They all show no errors + warnings, and they load up fine, but I have the score under the required amount and I still can enter planes what require score.
Reply
#7

Anyone? I really need this to work, no matter what I try it dosent work.
Reply
#8

erm. I tested all the code I posted and it worked fine..


as for the OnPlayerStateChange code you posted, you're returning 0 at the end of the callback, try this? :


pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //20 Score Aircraft
        if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
            RemovePlayerFromVehicle(playerid);
        }
        //40 Score Aircraft
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
            RemovePlayerFromVehicle(playerid);
        }
        //60 Score Aircraft
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by blewert
Посмотреть сообщение
erm. I tested all the code I posted and it worked fine..


as for the OnPlayerStateChange code you posted, you're returning 0 at the end of the callback, try this? :


pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //20 Score Aircraft
        if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
            RemovePlayerFromVehicle(playerid);
        }
        //40 Score Aircraft
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
            RemovePlayerFromVehicle(playerid);
        }
        //60 Score Aircraft
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Thanks for the code, I will test it and get back to you soon.
Reply
#10

As you can see I dont have the required score.



Yet im flying the vehilce just fine:



The filterscript is loaded.



And this is the full script:

pawn Код:
#include <a_samp>
#include <a_colors>
#include <JunkBuster>

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER )
    {
        //20 Score Aircraft
        if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 519) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 563) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 20) && IsPlayerInVehicle(playerid, 548) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
            RemovePlayerFromVehicle(playerid);
        }
        //40 Score Aircraft
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 577) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 40) && IsPlayerInVehicle(playerid, 417) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
            RemovePlayerFromVehicle(playerid);
        }
        //60 Score Aircraft
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 520) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 592) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
            RemovePlayerFromVehicle(playerid);
        }
        else if( (GetPlayerScore(playerid) < 60) && IsPlayerInVehicle(playerid, 425) )
        {
            SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)