Vidie 5 Odesláno: 15. Duben, 2013 Share Odesláno: 15. Duben, 2013 Zdravim, mam mensi problem. Kdyz zamkne hrac vozidlo, tak je zamknuto pro ostatni hrace, ale pro ty co se pripoji, tak je vozidlo odemknuto. Ukaze mi nekdo, jak tomu zamezit? Diky. Link to comment Share on other sites More sharing options...
0 Paulo* 32 Odesláno: 15. Duben, 2013 Share Odesláno: 15. Duben, 2013 mas tam nekde pri tom MAX_PLAYERS? alebo v publicu OnPlayerConnect mas odemknuto[playerid] = 1; Link to comment Share on other sites More sharing options...
0 Vidie 5 Odesláno: 15. Duben, 2013 Author Share Odesláno: 15. Duben, 2013 COMMAND:lock(playerid) { if(IsPlayerInAnyVehicle(playerid)) { if(PlayerInfo[playerid][LockedVehicle] != GetPlayerVehicleID(playerid)) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(i == playerid) continue; SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1); if(PlayerInfo[playerid][LockedVehicle] != INVALID_VEHICLE_ID) { SetVehicleParamsForPlayer(PlayerInfo[playerid][LockedVehicle], i, 0, 0); } } PlayerInfo[playerid][LockedVehicle] = GetPlayerVehicleID(playerid); SendClientMessage(playerid, -1, ""COL_GREEN"Vozidlo bylo zamknuto."); } else { SendClientMessage(playerid, -1, ""COL_RED"Vozidlo už je zamknuto."); } } else { SendClientMessage(playerid, -1, ""COL_RED"Musíte být ve vozidle."); } return 1; } Link to comment Share on other sites More sharing options...
0 Petr 44 Odesláno: 15. Duben, 2013 Share Odesláno: 15. Duben, 2013 Záleží, jak to chceš mít. jestli se jedná třeba o auto u domu, řešil bych to přes nick. No a jestli to chceš přes proměnnou, tak nebudeš nastavovat u proměnné hodnoty 0,1 ale přímo ID hráče. Link to comment Share on other sites More sharing options...
Dotaz
Vidie 5
Zdravim,
mam mensi problem. Kdyz zamkne hrac vozidlo, tak je zamknuto pro ostatni hrace, ale pro ty co se pripoji, tak je vozidlo odemknuto. Ukaze mi nekdo, jak tomu zamezit?
Diky.
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now