Jump to content

Question

Posted

Problema intalnita (descriere): Pai am un filterscript pt DMV si cand urc in masinile de la examen imi spune ca nu am permisul, cum pot ca atunci cand un player urca in masina de examen sa-l lase sa conduca in timpul testului de condus
Ero(area / rile) / warning-(ul / urile): Mai sus.
Liniile de cod / sursa / script-ul(obligatoriu): http://pastebin.com/1Bi8T8hd
Imagini / Video (optional): http://imgur.com/N2P4VcX
Ati incercat sa rezolvati singur?: Da, dar acelasi lucru..

350x20_FFFFFF_FFFFFF_000000_000000.png

15 answers to this question

Recommended Posts

  • 0
Posted

Cauta in gamemode (nu filterscript-ul DMV) la callback-ul OnPlayerEnterVehicle sau OnPlayerStateChange functia RemovePlayerFromVehicle, respectiv acel mesaj (You can't drive this vehicle ....). Daca gasesti acea functie in unul dintre cele doua callback-uri, lasa-ne aici bucata de script.

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

  • 0
Posted

Am gasit asta:

 

if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{// 38 / 49 / 56 = SS
//new oldcar = gLastCar[playerid];
//new housecar = PlayerInfo[playerid][pPhousekey]+1;
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
if(IsABoat(newcar))
{
   if(PlayerInfo[playerid][pBoatLic] < 1)
{
   SendClientMessage(playerid, COLOR_GREY, "You don't know how to Sail yet, so you left the Boat !");
   RemovePlayerFromVehicle(playerid);
}
}
else if(IsAPlane(newcar))
{
   if(PlayerInfo[playerid][pFlyLic] < 1)
{
   if(TakingLesson[playerid] == 1) { }
   else {
   SendClientMessage(playerid, COLOR_GREY, "You don't know how to Fly yet, so you left the Plane !");
   RemovePlayerFromVehicle(playerid); }
}
}
else
{
if(PlayerInfo[playerid][pCarLic] < 1)
{
   if(PlayerDrunk[playerid] >= 5)
{
   WantedPoints[playerid] += 1;
SetPlayerCriminal(playerid,255, "Drunk Driving");
}
if(TakingLesson[playerid] == 1 || IsABike(newcar)) { }
else {
SendClientMessage(playerid, COLOR_GREY, "You don't know how to Drive yet, so you left the Car !");
RemovePlayerFromVehicle(playerid); }
}
else if(PlayerDrunk[playerid] >= 5)
{
   WantedPoints[playerid] += 1;
SetPlayerCriminal(playerid,255, "Drunk Driving");
}
}//Done with car check
if(IsACopCar(newcar))
{
   if(IsACop(playerid)) { }
   else { RemovePlayerFromVehicle(playerid); }
}
else if(IsAnAmbulance(newcar))
{
   if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { }
   else { RemovePlayerFromVehicle(playerid); }
}
         if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456)
{
   if(PlayerInfo[playerid][pJob] == 16)
{
format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
}
else
{
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, COLOR_GREY,"Nu esti trucker.");
}
}

350x20_FFFFFF_FFFFFF_000000_000000.png

  • 0
Posted

Din ce script mi-ai dat tu, nu prea gasesc faza cu licenta de condus. Cauta mesajul "You can't drive this vehicle because you don't have a driver license".

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

  • 0
Posted

Nu prea inteleg, tu ai mai multe DMV-uri si presupun ca unul dintre ele se afla deja in gamemode si se foloseste de functia TakingLesson[playerid], care, daca este setata pe 1 (variabila fiind "activa", adica ai inceput testul de conducere), te lasa sa intri in masina, in caz contrar te scoate din masina daca serverul depisteaza ca functia TakingLesson[playerid], este setata pe 0.

 

Daca vrei sa folosesti un sistem nou de DMV, scoate-l pe cel din gamemode si inlocuieste-l.

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

  • 0
Posted (edited)

Takinglesson este de la school instructor..

Am gasit asta:

   if(IsABoat(newcar))
{
   if(PlayerInfo[pBoatLic] < 1 && GetPlayerState(i) == 2)
{
   RemovePlayerFromVehicle(i);
}
}
else if(IsAPlane(newcar))
{
   if(PlayerInfo[pFlyLic] < 1 && GetPlayerState(i) == 2)
{
   if(TakingLesson == 1) { }
   else { RemovePlayerFromVehicle(i); }
}
}
else
{
if(PlayerInfo[pCarLic] < 1 && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
{
if(TakingLesson == 1 || IsABike(newcar)) { }
   else { RemovePlayerFromVehicle(i); }
}
}//Done with car check
   if(UsedFind >= 1)
   {
       UsedFind += 1;
if(UsedFind >= 120)
{
   UsedFind = 0;
}
   }
Edited by Jirk

350x20_FFFFFF_FFFFFF_000000_000000.png

  • 0
Posted

Din ce am inteles eu din topicurile de mai sus, tu ai sistem DMV si in gamemode si FS? Daca da, lasa numai unul ca n-o sa mearga cum trebuie!

 

Daca nu ai in gamemode scriptul, implementeaza-l in gamemode ! ( <-- "Pai am un filterscript pt DMV" )

  • 0
Posted

Nu ai inteles.. Eu bag sistemul dmv , dar mie imi spune ca nu am permisul cand urc in masina de la DMV.. Vreau sa pot conduce masina la examen.

350x20_FFFFFF_FFFFFF_000000_000000.png

  • 0
Posted

Daca ai sistemul cu DMV in gamemode, posteaza OnPlayerStateChange. Dar incearca sa nu postezi tot ce-i acolo, ci ceea ce ne intereseaza.

  • 0
Posted

Nu îl am în gamemode. Am filterscript dmv dar eroarea care îmi zice când urc în masina ca nu am licență, am postat mai sus.

350x20_FFFFFF_FFFFFF_000000_000000.png

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.