07.11.2010, 02:56
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.
After that, you should add at OnVehicleRespawn.
Nex probably you want allow to enter only admin
So at OnPlayerEnterVehicle
Hope you understood, ofcourse maybe there are some mistakes so wathout by yourself.
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.
}
pawn Код:
if(vehicleid >= 1 && vehicleid <= youradmincars+1)
{
AddVehicleComponen(vehicleid,1010);
}
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