06.10.2013, 16:38
You can either:
1)
or
EDIT: Or do what's said up above.
1)
pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
if(!ispassenger && pTeam[playerid] != team_lspd && GetVehicleModel(vehicleid) == 598)
{
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
SetPlayerPos(playerid,pos[0],pos[1],pos[2]);
SendClientMessage(playerid,-1,"This vehicle is owned by LSPD.");
}
return 1;
}
pawn Код:
new lspdcar[3];
lspdcar[0] = CreateVehicle(..);
lspdcar[1] = CreateVehicle(..);
lspdcar[2] = CreateVehicle(..);
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
for(new i = 0; i < sizeof(lspdcar); i++)
{
if(vehicleid == lspdcar[i] && pTeam[playerid] != team_lspd)
{
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
SetPlayerPos(playerid,pos[0],pos[1],pos[2]);
SendClientMessage(playerid,-1,"This vehicle is owned by LSPD.");
}
}
return 1
}