11.09.2011, 10:31
Hey guys,
Im currencly making a PVeh FS, but i want anti-pveh-jacking. So if its not your pveh, you cant enter it.
Im using the variable vVehicle[]; for creating the vehicle, and im kinda stuck at the OnPlayerEnterVehicle.
Atm i got this. Its working, but whenever i try to enter the vehicle, it just shows me the message 'This vehicle is not yours'.
Can someone give me a push in the right direction, so i can continue?
~Wesley
Im currencly making a PVeh FS, but i want anti-pveh-jacking. So if its not your pveh, you cant enter it.
Im using the variable vVehicle[]; for creating the vehicle, and im kinda stuck at the OnPlayerEnterVehicle.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
new Float:Pos[3];
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if( vVehicle[i] != playerid )
{
GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid, COLOR_RED, " ** This vehicle is not yours! ");
RemovePlayerFromVehicle( i );
break;
}
}
return 1;
}
Can someone give me a push in the right direction, so i can continue?
~Wesley