01.09.2010, 09:19
Here's a script:
And the problem is:
If I am setted in 1st Team, I can't enter car, if Im in other Teams I still can't enter those cars. And I'm sure I have setted those cars for Team 1. So what I have done wrong?
pawn Код:
public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger )
{
new PlayerVehicle = GetVehicleFileID( GetPlayerVehicleID( playerid ) );
if (Vehicles[PlayerVehicle][CarTeam] != 0 && Vehicles[PlayerVehicle][CarTeam] != Player[playerid][Team] && !ispassenger)
{
//clear
}
else
{
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
}
return 1;
}
If I am setted in 1st Team, I can't enter car, if Im in other Teams I still can't enter those cars. And I'm sure I have setted those cars for Team 1. So what I have done wrong?