help jobs
#1

Hello all I would like to require such lessons as assigned machine work there say he practiced medicine and can only vazuoti with the machine
Reply
#2

up my topic
Reply
#3

Can you please rephrase your question? At the moment, it does not make that much sense and is hard for us to read.
Reply
#4

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Can you please rephrase your question? At the moment, it does not make that much sense and is hard for us to read.
I want to make the machine would be assigned to work
Reply
#5

I would go about creating static vehicles and adding stocks like IsACopCar, IsAnAmbulance, IsAFiretruck, etc.

This must go under OnGameModeInit:
Код:
AddStaticVehicleEx ( 416, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 15 );//ambulance 1 (random position with colors 0 and 1, set to respawn after 15 seconds when not used)
AddStaticVehicleEx ( 416, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 15 );//ambulance 2 (same as above)
This can go anywhere:
Код:
stock IsAnAmbulance(vehicleid)
{
    switch(vehicleid):
    {
        case 1: true;
        case 2: true;
    }
    return 1;
}
And under OnPlayerEnterVehicle call (if you don't have it add it):

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsAnAmbulance(vehicleid) && !medic(playerid) == 1//Assign it either to a job or a faction or whatever)
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, 0xFFFFFFFF, "This vehicle is only for medics!");
    }
}
I'm just too lazy to explain any further at the moment ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)