- 0
Problema DMV(MySQL)
-
Similar Content
-
- 1 answer
- 372 views
-
- 8 answers
- 811 views
-
Problema billboards (la expirarea billboard-ului nu seteaza variabila Billboard 0 jucatorului offline)
By cstef4n,
- 2 answers
- 561 views
-
- 1 answer
- 983 views
-
Gamemode Hardgaming Versiunea a 4-a (no-mysql) 1 2
By n0dEv,
- luatil cai kald.
- hardgaming v4
- (and 90 more)
- 42 replies
- 12.045 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.

Question
Gawitkkk
Nick: Gawitkkk
Problema: Salut tuturor, recent am schimbat sistemul de DMV si dupa ce am terminat testul si dau relog nu mai am permisul, stiu ca este ceva legat de MySQL..
Erori / warnings: -
Lini/script: -
Ai incercat sa rezolvi singur ?: Da.
P.S Nu prea stiu eu cum e cu topicurile pe aici, imi pare rau daca am facut o greseala si nu am respectat ceva.
Vechea comanda de exam:
if(strcmp(cmd, "/exam", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pBoatLic] == 0) { if(dmvtime == 0) { if(PlayerToPoint(3.0,playerid,937.5846,-1739.2441,13.5469)) { if(GetPlayerCash(playerid) >= 5000) {} else return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}DMV: {FFFFFF}You need $5,000!"); if(!IsVehicleOccupied(boatsi)) PutPlayerInVehicle(playerid, boatsi, 0); else if(!IsVehicleOccupied(boatsi1)) PutPlayerInVehicle(playerid, boatsi1, 0); else { SendClientMessage(playerid, COLOR_WHITE, "{0099FF}Info: {FFFFFF}All the DMV boats are occupied!"); return 1; } TakingLesson[playerid] = 1; SetPlayerRaceCheckpoint(playerid,3,418.4089,-1956.2709,-0.1005, 401.8729,-2021.8424,-0.2336,7); CP[playerid] = 320; SendClientMessage(playerid, COLOR_WHITE, " "); SendClientMessage(playerid, COLOR_FADE1, "{ee5555}DMV: {a9c4e4}You'll get taxed for $5,000 if you finish the test."); SendClientMessage(playerid, COLOR_WHITE, " "); SendClientMessage(playerid, COLOR_FADE1, "{ee5555}DMV: {a9c4e4}If you want to finish the test, sail the boat into the checkpoints."); return 1; } } else { SendClientMessage(playerid, 0xee5555FF, "We can't find any instructor. Wait 5 more seconds please."); return 1; } } if(PlayerInfo[playerid][pFlyLic] == 0) { if(dmvtime == 0) { if(PlayerToPoint(3.0,playerid,1957.1649,-2183.6143,13.5469)) { if(GetPlayerCash(playerid) >= 5000) {} else return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}DMV: {FFFFFF}You need $5,000!"); if(!IsVehicleOccupied(planesi)) PutPlayerInVehicle(playerid, planesi, 0); else if(!IsVehicleOccupied(planesi1)) PutPlayerInVehicle(playerid, planesi1, 0); else { SendClientMessage(playerid, COLOR_WHITE, "{0099FF}Info: {FFFFFF}All the DMV planes are occupied!"); return 1; } TakingLesson[playerid] = 1; SetPlayerRaceCheckpoint(playerid,3,1570.0110,-2593.5493,14.0566, 1789.3186,-2593.9263,20.4397,10); CP[playerid] = 300; SendClientMessage(playerid, COLOR_WHITE, " "); SendClientMessage(playerid, COLOR_FADE1, "{ee5555}DMV: {a9c4e4}You'll get taxed for $5,000 if you finish the test."); SendClientMessage(playerid, COLOR_WHITE, " "); SendClientMessage(playerid, COLOR_FADE1, "{ee5555}DMV: {a9c4e4}If you want to finish the test, sail the boat into the checkpoints."); return 1; } } else { SendClientMessage(playerid, 0xee5555FF, "We can't find any instructor. Wait 5 more seconds please."); return 1; } } if(PlayerInfo[playerid][pCarLic] == 0) { if(dmvtime == 0) { if(PlayerToPoint(3.0,playerid, 937.4717,-1739.2224,13.5469)) { if(GetPlayerCash(playerid) >= 5000) {} else return SendClientMessage(playerid, COLOR_WHITE, "{0099FF}DMV: {FFFFFF}You need $5,000!"); dmvtime = 5; SetPlayerPos(playerid, 360.3414,197.9407,1014.1879); SetPlayerFacingAngle(playerid, 357.9603); ApplyAnimation(playerid,"MISC","SEAT_LR",4.1,0,0,0,1,1,1); DMVTime[playerid] = 1; TogglePlayerControllable(playerid, 0); SetPlayerInterior(playerid, 3); TakingLesson[playerid] = 1; return 1; } } else { SendClientMessage(playerid, 0xee5555FF, "We can't find any instructor. Wait 5 more seconds please."); return 1; } } } return 1; }Actuala comanda de exam:if(strcmp(cmd, "/exam", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(2.0,playerid,1637.6001,-2177.4355,13.5799)) { if(PlayerInfo[playerid][pCarLic] == 0) { new bool: CarInUse[CAR_AMOUNT]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle(i)) { CarInUse[GetPlayerVehicleID(i)] = true; } } if(PlayerInfo[playerid][pCarLic] > 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your driving license is still suspended."); return 1; } if(GetPlayerCash(playerid) < 5000) { SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You don't have enough money."); return 1; } if(!CarInUse[examcar1]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar1, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar2]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar2, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar3]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar3, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar4]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar4, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar5]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar5, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar6]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar6, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "* Can't start the test right now. No exam cars available."); } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You already have a driving license."); return 1; } } } return 1; } [if(strcmp(cmd, "/exam", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(2.0,playerid,1637.6001,-2177.4355,13.5799)) { if(PlayerInfo[playerid][pCarLic] == 0) { new bool: CarInUse[CAR_AMOUNT]; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle(i)) { CarInUse[GetPlayerVehicleID(i)] = true; } } if(PlayerInfo[playerid][pCarLic] > 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your driving license is still suspended."); return 1; } if(GetPlayerCash(playerid) < 5000) { SendClientMessage(playerid, COLOR_LIGHTRED, "Error: You don't have enough money."); return 1; } if(!CarInUse[examcar1]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar1, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar2]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar2, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar3]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar3, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar4]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar4, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar5]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar5, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else if(!CarInUse[examcar6]) { CP[playerid] = 1000; TakingLesson[playerid] = 1; PutPlayerInVehicle(playerid, examcar6, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Use /engine to start the engine and follow the checkpoints."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Don't leave the car, you will fail the test."); SetPlayerRaceCheckpoint(playerid, 0,1642.69,-2192.15,14.89,1477.06,-2191.92,14.82, 5.0); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "* Can't start the test right now. No exam cars available."); } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You already have a driving license."); return 1; } } } return 1; }5 answers to this question
Recommended Posts