Jump to content
  • 0

pomoc [HELP]Majiteľ


Sparko

Dotaz

Čawte mám house system od QWER-a.

Potrebujem spraviť aby hráč mohol vlastniť iba 1 dom.

No neviem ako pomôže mi prosím niekto ?

 

A mám ďalší problém tiež v tomto house systeme.

Ak si hráč kúpi auto k domu tak ostatný hráči si ho môžu normálne zobrať.

Link to comment
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new HC = HouseInfo[houseid][CarSlots];
    new houseid;
    if(Vehicle[houseid][HC] == vehicleid) return SendClientMessage(playerid,-1,"Nemôžeš nastúpiť do tohto auta");
    TogglePlayerControllable(playerid,true);
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    TogglePlayerControllable(playerid,false);
return 1;
}

 

Skús to takto.. Neviem či to bude fungovať pretože to asi nepôjde nastúpiť do žiadného auta kúpené domom.. Niesom si ale istý skús a napíš :)

Link to comment
Share on other sites

  • 0

TeCHNoToMo :facepalm: aspoň nepíš nezmysly...

 

 

čo máš za problém šak to tam je

public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER){
new vehicleid = GetPlayerVehicleID(playerid);
for(new h; h < HouseCount+1;h++){
for(new vehicl; vehicl < MAX_CARS+1;vehicl++){

if(vehicleid == Vehicle[h][vehicl]){
if(!IsPlayerHouseOwner(playerid,h)){
RemovePlayerFromVehicle(playerid);
}
}
}
}
}
return 1;
}

 

tak sorry trocha som pripitý :d

Link to comment
Share on other sites

  • 0

Ja používam QWERou HS a funguje mi to

 

public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER){
new vehicleid = GetPlayerVehicleID(playerid);
for(new h; h < HouseCount+1;h++){
for(new vehicl; vehicl < HouseInfo[h][CarSlots]+1;vehicl++){
if(vehicleid == Vehicle[h][vehicl]){
if(!IsPlayerHouseOwner(playerid,h)){
RemovePlayerFromVehicle(playerid);
SCM(playerid,0xFFFFFFFF,"Toto auto nieje tvoje");
}
}
}
}
}
return 1;
}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...