Faction Vehicles help.
#4

You can either:

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;
}
or

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
}
EDIT: Or do what's said up above.
Reply


Messages In This Thread
Faction Vehicles help. - by Heisenbergx2 - 06.10.2013, 16:34
Re: Faction Vehicles help. - by Heisenbergx2 - 06.10.2013, 16:37
Re: Faction Vehicles help. - by DanishHaq - 06.10.2013, 16:38
Re: Faction Vehicles help. - by xXShadowXx - 06.10.2013, 16:38
Re: Faction Vehicles help. - by Heisenbergx2 - 06.10.2013, 16:43

Forum Jump:


Users browsing this thread: 2 Guest(s)