SA-MP Forums Archive
Lock car for team? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lock car for team? (/showthread.php?tid=164824)



Lock car for team? - Kitten - 02.08.2010

Solved


Re: Lock car for team? - Retardedwolf - 02.08.2010

pawn Код:
if(gTeam[playerid] != TEAM_SPEC)
{
    PutPlayerInVehicle(vehicleid)
    }
}



Re: Lock car for team? - Kitten - 02.08.2010

are u dumb?

EDIT: FIXED


Re: Lock car for team? - willsuckformoney - 02.08.2010

win lol && there is a tutorial on it


Re: Lock car for team? - Kitten - 02.08.2010

a friend did it for me


Re: Lock car for team? - iggy1 - 02.08.2010

what id do:
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(GetPlayerTeam(forplayerid) == TEAM_SPEC)
    {
        SetVehicleParamsForPlayer(vehicleid, forplayerid,0,1);
    }
    return 1;
}



Re: Lock car for team? - Retardedwolf - 02.08.2010

No I ain't dumb.


Re: Lock car for team? - Mike Garber - 02.08.2010

Quote:
Originally Posted by iggy1
Посмотреть сообщение
what id do:
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(GetPlayerTeam(forplayerid) == TEAM_SPEC)
    {
        SetVehicleParamsForPlayer(vehicleid, forplayerid,0,1);
    }
    return 1;
}
This will lock all vehicles xD

However this one is better :P

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{


    if(vehicleid >= 1 && vehicleid <= 19){ // EXAMPLE (Between VIN 1 & VIN 19)
        if(gteam[forplayerid]==Team_NAME){
            SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
        }else{
            SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
        }
    }
}



Re: Lock car for team? - iggy1 - 02.08.2010

Quote:
Originally Posted by Kitten
Посмотреть сообщение
well i got a city wide DM script i got but i want all cars to be locked for TEAM_SPEC
he/she wanted all cars locking lol