29.01.2011, 18:55
Hello,
I got a problem with my code for a database system for cops. It's not responding. But the code that i use seems to be valid ...
Anyone know the problem?
EDIT: GetVehicleOwner code:
Thanks,
Danny
I got a problem with my code for a database system for cops. It's not responding. But the code that i use seems to be valid ...
Anyone know the problem?
Код:
if(dialogid == 301) { for(new c=0; c<MAX_VEHICLES; c++) { if(!strcmp(inputtext, vPlate[c], false, 20)) { if(strlen(inputtext) != 0) { CloseAnyOpenPDialog(playerid); GetPlayerName(GetVehicleOwner©, iname, sizeof(iname)); format(str, sizeof str,"Vehicle Name: %s\nVehicle Plate: %s\nOwner: %s",GetVehicleName©,vPlate[c],iname); ShowPlayerDialog(playerid, 387, DIALOG_STYLE_MSGBOX, "Trace licenseplate", str, "Close", "_"); return 1; } } SendClientMessage(playerid, COLOR_RED,"DATABASE: The entered licenseplate is not found."); return 1; } }
Код:
public GetVehicleOwner(vehicleid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(vehicleid == pVeh[i]) return i; } return -1; }
Danny