Nu te inregistra daca esti idiot sau agramat!
AlphaCS.RO[ORIGINAL GAMING]
Thanks:
0
Likes:
0
-
[Tutorial] Snap on Auto ID faction
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:
HTML Code:
new pFraction[MAX_PLAYERS];//Job Variable
In public OnPlayerConnect(playerid):
HTML Code:
pFraction[playerid] = 0;//None Job
All public:
HTML Code:
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;
}
2)Bind just the right car
All new:
HTML Code:
new car[2];//Your Massive Car
OnGameModeInit:
HTML Code:
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);
And Sure Public:
HTML Code:
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;
}
Similar Threads
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 21-07-17, 14:54
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules