01.03.2010, 18:09
hey. How do I lock a car for every player on the server? I've tried many things with VehicleStream in and Paramsforplayer but I can't get it to work.
Thanks.
Thanks.
for(new a=0; a < MAX_PLAYERS; a++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),a,0,1); }
Originally Posted by CJ101
Код:
for(new a=0; a < MAX_PLAYERS; a++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),a,0,1); } |
public OnVehicleStreamIn(vehicleid, forplayerid) { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1); return 1; }
Originally Posted by BlackFoX_UD_
Use OnVehicleStreamIn...
Код:
public OnVehicleStreamIn(vehicleid, forplayerid) { SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1); return 1; } |
public OnVehicleStreamIn(vehicleid, forplayerid) { SetVehicleParamsForPlayer(Rentcar,forplayerid,0,1); return 1; }
new IsVehicleLocked[MAX_VEHICLES][2]; // 0 is if it is locked or not and 1 the one which the car is not locked for
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if(IsVehicleLocked[vehicleid][0] == 1)
{
if(IsVehicleLocked[vehicleid][1] != forplayerid) SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
}
return 1;
}