De ce imi iau 'Server closed the connections' cand incerc sa modific pozitia la dmv? Dupa ce dau ok la dialog, instant.
Comanda + DIALOG:
YCMD:editdmvpos(playerid, params[], help) {
if(PlayerInfo[playerid][userAdmin] < 6) return SCM(playerid, COLOR_ERROR, "Eroare: Nu esti administrator level 6+.");
ShowPlayerDialog(playerid, DIALOG_EDITDMV, DIALOG_STYLE_MSGBOX, "Edit DMV Position:", "Esti sigur ca vrei sa schimbi pozitia DMV-ului?", "Ok", "Cancel");
return 1;
}
case DIALOG_EDITDMV: {
if(!response) return 1;
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
dmvVariables[0][cpPos][0] = pos[0];
dmvVariables[0][cpPos][1] = pos[1];
dmvVariables[0][cpPos][2] = pos[2];
gString[0] = (EOS);
mysql_format(SQL, gString, sizeof gString, "UPDATE `server_dmv` SET `dmvCPX` = '%f' , `dmvCPY` = '%f' , `dmvCPZ` = '%f' WHERE `dmvCPID` = '1'", pos[0], pos[1], pos[2]);
mysql_tquery(SQL, gString, "", "");
DestroyDynamicPickup(dmvVariables[0][cpPickup]);
DestroyDynamic3DTextLabel(dmvVariables[0][cpLabel]);
dmvVariables[0][cpLabel] = CreateDynamic3DTextLabel("{FFFFFF}Scoala Auto\nApasa {FF0000}Y{FFFFFF} pentru a incepe examenul auto", 0x33CCFFFF, dmvVariables[0][cpPos][0], dmvVariables[0][cpPos][1], dmvVariables[0][cpPos][2], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
dmvVariables[0][cpPickup] = CreateDynamicPickup(1239, 1, dmvVariables[0][cpPos][0], dmvVariables[0][cpPos][1], dmvVariables[0][cpPos][2]);
sendToAdmins(COLOR_ADMCOMMANDS, "[Admin Info]: {FFFFFF}%s a schimbat pozitia DMV-ului.", returnName(playerid));
SCM(playerid, COLOR_ROZ, "Ai schimbat pozitia DMV-ului cu succes.");
}