22.11.2013, 23:52
Okay, So I've been create a faction vehicle.
And I've been set the driver must on the selected faction, If he want to drive the car.
But, I want make the passenger can enter the car whilst he isn't in the car faction..
Okay, Here's the code.
Sorry bad english.
And I've been set the driver must on the selected faction, If he want to drive the car.
But, I want make the passenger can enter the car whilst he isn't in the car faction..
Okay, Here's the code.
Sorry bad english.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 0; i < 12; i++)
{
if(vehicleid == LSPDVehicles[i])
{
if(PlayerInfo[playerid][pFaction] != 1)
{
ClearAnimations(playerid);
SendClientMessage(playerid, -1, "You are not member of LSPD!");
}
}
else if(vehicleid == LSMDVehicles[i])
{
if(PlayerInfo[playerid][pFaction] !=2)
{
ClearAnimations(playerid);
SendClientMessage(playerid, -1, "You are not member of LSMD!");
}
}
}
return 1;
}