Jump to content
  • 0

Ajutor Restrictii masini.


Spookie

Question

Salut ! Am si eu o problema. Am un bug, cand ma urc in masina si de ex. nu am carnet ma da jos dar nu pot sa ma misc. Am reusit sa rezolv bugul pentru masinile de politie/ambulante si pentru masinile de civili. Dar la restul factiunilor tot ma blocheaza. Aici este codul de restrictie , am acest cod pentru fiecare factiune

        [pawn] if(newcar == PR1 || newcar == PR2 || newcar == PR3)

{

    if(PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pLeader] == 7) { }

    else

{

new Float:cx, Float:cy, Float:cz;

GetPlayerPos(playerid, cx, cy, cz);

SetPlayerPos(playerid, cx,  cy, cz);

SendClientMessage(playerid,COLOR_GREY,"You are not a member Mayor !");

        RemovePlayerFromVehicle(playerid);

    }

}[/pawn]

Codul de pornit motorul este acesta

      [pawn]if(newkeys == KEY_JUMP)

{

if(IsPlayerInAnyVehicle(playerid))

{

if(IsPlayerConnected(playerid))

{

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 510 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 509 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 481){

return 1;

}

if(VehicleStarted[GetPlayerVehicleID(playerid)] == 0)

{

new string[256];

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "» %s incearca sa porneasca motorul.", sendername);

ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

SetTimerEx("Starting",1000,0,"i",playerid);

}

}

}

}[/pawn]

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Adauga functia TogglePlayerControllable

[pawn] if(newcar == PR1 || newcar == PR2 || newcar == PR3)

{

    if(PlayerInfo[playerid][pMember] == 7||PlayerInfo[playerid][pLeader] == 7) { }

    else

{

new Float:cx, Float:cy, Float:cz;

GetPlayerPos(playerid, cx, cy, cz);

SetPlayerPos(playerid, cx,  cy, cz);

SendClientMessage(playerid,COLOR_GREY,"You are not a member Mayor !");

        RemovePlayerFromVehicle(playerid);

        TogglePlayerControllable(playerid,0);

    }

}[/pawn]

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.