29.01.2015, 14:45
1)Hello! Today I want to show you my first rabotu.Kak snap all machines go to the faction.
For example, I take a fraction Doctor
and any cars with ID 416,
Let's start
All new:
In public OnPlayerConnect(playerid):
All public:
2)Bind just the right car
All new:
OnGameModeInit:
And Sure Public:
Thanks for watching,i made it.
P.S Sorry But English,i translate with ****** translater xDxD
For example, I take a fraction Doctor
and any cars with ID 416,
Let's start
All new:
Код HTML:
new pFraction[MAX_PLAYERS];//Job Variable
Код HTML:
pFraction[playerid] = 0;//None Job
Код HTML:
public OnPlayerStateChange(playerid, newstate, oldstate) { new newcar = GetPlayerVehicleID(playerid); if(newcar == 416) // { if(pFraction[playerid] == 0)//Doctor Job { } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, -1, "** You are not a doctor !"); } } return 1; }
All new:
Код HTML:
new car[2];//Your Massive Car
Код HTML:
car[0] = AddStaticVehicle(CARID, x, y, z, rotation, color1, color2);//Choose according to your settings car[1] = AddStaticVehicle(CARID, x, y, z, rotation, color1, color2);
Код HTML:
public OnPlayerStateChange(playerid, newstate, oldstate) { new newcar = GetPlayerVehicleID(playerid); if(newcar >= car[0] && newcar <= car[1]) // { if(Сondition)//True { //Code } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, -1, "** You can not go in the car !"); } } return 1; }
P.S Sorry But English,i translate with ****** translater xDxD