Need help with Some pawn
#2

pawn Код:
CMD:test(playerid, params[])
{
    if(IsPlayerInVehicle(playerid, 522))
    {
        //Do something if they are in NRG
    }
    //If they are not in NRG
    return 1;
}
And if you want to make a few vehicles get checked, use something like this stock:

pawn Код:
stock IsCertainVehicle(playerid)
{
    if(IsPlayerInVehicle(playerid, 522) || IsPlayerInVehicle(playerid, 411))
    {
        return true;
    }
    else return false;
}
Then use the stock like this:

pawn Код:
CMD:test(playerid, params[])
{
    if(IsCertainVehicle(playerid))
    {
        //If they are in NRG or Infernus
    }
    //If they are NOT in NRG or Infernus
    return 1;
}
Hope I helped.
Reply


Messages In This Thread
Need help with Some pawn - by Rohan_Ubhare - 28.06.2012, 06:36
Re: Need help with Some pawn - by Kindred - 28.06.2012, 06:43
Re: Need help with Some pawn - by [MM]RoXoR[FS] - 28.06.2012, 08:47

Forum Jump:


Users browsing this thread: 1 Guest(s)