Only Admin Car
#4

Bwah if you want Nitros for all cars dont make variables or smth like that, create another function.
ofcourse this can be done with admin cars too.. But make admincars in first then create other cars because you will need to count how many admin cars you have.

pawn Код:
stock AddCar(model,Float:x,Float:y,Float:z,Float:a,color1,color2,time)
{
     static vehicleid;
     vehicleid = AddStaticVehicleEx(model,Float:x,Float:y,Float:z,Float:a,color1,color2,time);
     AddVehicleComponent(vehicleid,1010);
     //dnt remember if there is needed a return value.
}
After that, you should add at OnVehicleRespawn.
pawn Код:
if(vehicleid >= 1 && vehicleid <= youradmincars+1)
{
     AddVehicleComponen(vehicleid,1010);
}
Nex probably you want allow to enter only admin

So at OnPlayerEnterVehicle
pawn Код:
static vehicleid = GetPlayerVehicleId(playerid);
if(vehicleid >= 1 && vehicleid <= youradmincars+1)
{
     if(isAdmin or your values) { }
     else { static Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z);SetPlayerPos(playerid,x,y,z); return 0;}
} // return 0 at else should not allow to stream it to other players i dnt know ;D
Hope you understood, ofcourse maybe there are some mistakes so wathout by yourself.
Reply


Messages In This Thread
Only Admin Car - by Larsey123IsMe - 07.11.2010, 02:01
Re: Only Admin Car - by -Rebel Son- - 07.11.2010, 02:06
Re: Only Admin Car - by Larsey123IsMe - 07.11.2010, 02:12
Re: Only Admin Car - by GaGlets(R) - 07.11.2010, 02:56
Re: Only Admin Car - by Larsey123IsMe - 07.11.2010, 03:28
Re: Only Admin Car - by JamesC - 07.11.2010, 04:05
Re: Only Admin Car - by Th3Angel - 07.11.2010, 04:05
Re: Only Admin Car - by Larsey123IsMe - 07.11.2010, 04:15
Re: Only Admin Car - by Th3Angel - 07.11.2010, 04:27
Re: Only Admin Car - by Larsey123IsMe - 07.11.2010, 04:38

Forum Jump:


Users browsing this thread: 1 Guest(s)