How i can make the only soldier class, who able drive rhino?
#3

Try it maybe it helps you.

Код:
#define SNIPER 0
#define PILOT 1
#define SOLDIER 2

public OnPlayerRequestClass(playerid,classid)
{
       if(classid == x || classid == x)
       {
              gPlayerClass[playerid] = SOLDIER;
       }
       return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == SOLDIER) SendClientMessage(playerid, COLOR_BRIGHTRED, "Ok,enjoy your car!");
    else
    {
           SendClientMessage(playerid, COLOR_BRIGHTRED, "You need to be soldier to able drive rhino tank");
           RemovePlayerFromVehicle(playerid);
           return 1;
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)