#include <a_samp>forward AutoR();new lockedCar[MAX_VEHICLES]; public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp(cmdtext, \"/lock\", true)==0) { if (IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if (State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,0xFFFF00AA,\"You can only lock the doors as the driver.\"); return 1; } lockedCar[GetPlayerVehicleID(playerid)]=1; new i; for (i=0;i<MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1); } } SendClientMessage(playerid, 0xFFFF00AA, \"Vehicle locked!\"); new Float:pX, Float:pY, Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); PlayerPlaySound(playerid,1056,pX,pY,pZ); } else { SendClientMessage(playerid, 0xFFFF00AA, \"You\'re not in a vehicle!\"); } return 1; }if(strcmp(cmdtext, \"/unlock\", true)==0){ if(IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if (State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,0xFFFF00AA,\"You can only unlock the doors as the driver.\"); return 1; } new i; lockedCar[GetPlayerVehicleID(playerid)]=0; for (i=0;i<MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0); } SendClientMessage(playerid, 0xFFFF00AA, \"Vehicle unlocked!\"); new Float:pX, Float:pY, Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); PlayerPlaySound(playerid,1057,pX,pY,pZ); } else { SendClientMessage(playerid, 0xFFFF00AA, \"You\'re not in a vehicle!\"); }return 1; } if(strcmp(cmdtext, \"/flip\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new currentveh; new Float:angle; currentveh = GetPlayerVehicleID(playerid); GetVehicleZAngle(currentveh, angle); SetVehicleZAngle(currentveh, angle); SendClientMessage(playerid, 0xFFFFFFFF, \"Your vehicle has been flipped.\"); return 1; } else { SendClientMessage(playerid, 0xFFFFFFFF, \"You are not in any vehicle!\"); return 1; } } return 0;} public AutoR() { for(new playerid=0; playerid<MAX_PLAYERS; playerid++) { if(IsPlayerConnected(playerid)) { new Float:health, cid; if (IsPlayerInAnyVehicle(playerid)) { cid = GetPlayerVehicleID(playerid); GetVehicleHealth(cid, health); if (health < 999) { SetVehicleHealth(cid,1000); GameTextForPlayer(playerid, \"Vehicle repaired!\",2000,5); } } } } return 1;}
Szia.Összedobtam neked egy /lock /unlock /flip és autorepair-t amihez nem kell semmi amit fellép valaki beül a kocsiba és összetöri javul is azonnal:D #include <a_samp>forward AutoR();new lockedCar[MAX_VEHICLES]; public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp(cmdtext, \"/lock\", true)==0) { if (IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if (State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,0xFFFF00AA,\"You can only lock the doors as the driver.\"); return 1; } lockedCar[GetPlayerVehicleID(playerid)]=1; new i; for (i=0;i<MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1); } } SendClientMessage(playerid, 0xFFFF00AA, \"Vehicle locked!\"); new Float:pX, Float:pY, Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); PlayerPlaySound(playerid,1056,pX,pY,pZ); } else { SendClientMessage(playerid, 0xFFFF00AA, \"You\'re not in a vehicle!\"); } return 1; }if(strcmp(cmdtext, \"/unlock\", true)==0){ if(IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if (State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,0xFFFF00AA,\"You can only unlock the doors as the driver.\"); return 1; } new i; lockedCar[GetPlayerVehicleID(playerid)]=0; for (i=0;i<MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0); } SendClientMessage(playerid, 0xFFFF00AA, \"Vehicle unlocked!\"); new Float:pX, Float:pY, Float:pZ; GetPlayerPos(playerid,pX,pY,pZ); PlayerPlaySound(playerid,1057,pX,pY,pZ); } else { SendClientMessage(playerid, 0xFFFF00AA, \"You\'re not in a vehicle!\"); }return 1; } if(strcmp(cmdtext, \"/flip\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new currentveh; new Float:angle; currentveh = GetPlayerVehicleID(playerid); GetVehicleZAngle(currentveh, angle); SetVehicleZAngle(currentveh, angle); SendClientMessage(playerid, 0xFFFFFFFF, \"Your vehicle has been flipped.\"); return 1; } else { SendClientMessage(playerid, 0xFFFFFFFF, \"You are not in any vehicle!\"); return 1; } } return 0;} public AutoR() { for(new playerid=0; playerid<MAX_PLAYERS; playerid++) { if(IsPlayerConnected(playerid)) { new Float:health, cid; if (IsPlayerInAnyVehicle(playerid)) { cid = GetPlayerVehicleID(playerid); GetVehicleHealth(cid, health); if (health < 999) { SetVehicleHealth(cid,1000); GameTextForPlayer(playerid, \"Vehicle repaired!\",2000,5); } } } } return 1;}
#include <a_samp>#define VEHICLE_CONTROL_DIALOG 1234#define COLOUR_INFORMATION 0xFF8C00FF#define COLOUR_ERROR 0xFF0000FF#define OFF 0#define ON 1#define AUTO_REOPEN_DIALOGnew Locked[MAX_PLAYERS], IsLocked[MAX_VEHICLES];new engine, lights, alarm, doors, bonnet, boot, objective; public OnPlayerConnect(playerid){Locked[playerid] = 0;return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ new string[128]; format(string, sizeof(string), \"Beültél egy jármübe ID: %i\",vehicleid); SendClientMessage(playerid, COLOUR_INFORMATION, string); return 1;}public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(\"/control\", cmdtext, true, 10) == 0){ShowVehicleControlDialog(playerid);return 1;}return 0;}stock ShowVehicleControlDialog(playerid){if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){return ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG, DIALOG_STYLE_LIST, \"Jármü Menu:\", \"Motor ki/be kapcsolás\\nLámpák\\nRiasztó\\nBezárás/Kinyitás \\nMotorháztetö\\nCsomagtartó\\nRendszámtábla átirás\", \"Választ\", \"Mégse\");}else return SendClientMessage(playerid, COLOUR_INFORMATION, \"Kocsi nélkül **szhatod:]!\");}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == VEHICLE_CONTROL_DIALOG && response){switch(listitem){ case 0: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+1, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Elinditod/Leállítom az motort?\", \"Elindítom\", \"Leállítom\"); case 1: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+2, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"{0xFFFFFF}Bekapcsolod a lámpákat?\", \"Bekapcsolom\", \"Kikapcsolom\"); case 2: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+3, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Bekapcsolod a riasztót?\", \"Bekapcsolom\", \"Kikapcsolom\"); case 3: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+4, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Bezárod/feloldod a kocsidat?\", \"Feloldom\", \"Lezárom\"); case 4: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+5, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Felnyitod a motorháztetöt? \", \"Felnyitás\", \"Lecsukás\"); case 5: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+6, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Felnyitod a csomagtartót?\", \"Felnyitás\", \"Lecsukás\"); case 6: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+7, DIALOG_STYLE_INPUT, \"Jármü Menu:\", \"Ird be az új rendszámot!\", \"Átirás\", \"Mégse\");}return 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+1){if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Elinditotad az Enginét!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Leálitotad az Enginét!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+2){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bekapcsoltad a lámpát!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, ON, alarm, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kikapcsoltad a lámpát!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, OFF, alarm, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+3){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bekapcsoltad a riasztót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, ON, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kikapcsoltad a riasztót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, OFF, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+4){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad az ajtókat!.\"); UnlockVehicle(GetPlayerVehicleID(playerid));}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad az ajtókat!\"); LockVehicle(playerid, GetPlayerVehicleID(playerid));}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+5){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad a motorháztetöt!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, ON, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad a motorháztetöt!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, OFF, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+6){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad a csomagtartót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, ON, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad a csomagtartót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, OFF, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+7){ new string[128], Float:X, Float:Y, Float:Z, Float:angle;if(strlen(inputtext) < 1 || strlen(inputtext) > return SendClientMessage(playerid, COLOUR_ERROR, \"Rosz rendszám!\");else{ format(string, sizeof(string), \"Beálitottad a rendszám táblát erre: \'%s\'.\", inputtext); SendClientMessage(playerid, COLOUR_INFORMATION, string); GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, angle); SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); GetPlayerPos(playerid, X, Y, Z); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); SetVehicleZAngle(GetPlayerVehicleID(playerid), angle); PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);}}return 0;}public OnVehicleStreamIn(vehicleid, forplayerid){ for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i) && IsLocked[vehicleid] == 1) SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);}return 1;}stock LockVehicle(playerid, vehicleid){for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i) && i != playerid){ IsLocked[vehicleid] = 1; SetVehicleParamsForPlayer(vehicleid,i,0,1); }}}stock UnlockVehicle(vehicleid){for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i)){ IsLocked[vehicleid] = 0; SetVehicleParamsForPlayer(vehicleid,i,0,0); }}}
És egy VehicleControl (/control)Átírhatod a rendszámod,ki-be nyithatod az ajtót;motorh.tetõ;csomagtartót lámpákat ki be kapcsolhatod ésriasztó is van ami elég bugos:D #include <a_samp>#define VEHICLE_CONTROL_DIALOG 1234#define COLOUR_INFORMATION 0xFF8C00FF#define COLOUR_ERROR 0xFF0000FF#define OFF 0#define ON 1#define AUTO_REOPEN_DIALOGnew Locked[MAX_PLAYERS], IsLocked[MAX_VEHICLES];new engine, lights, alarm, doors, bonnet, boot, objective; public OnPlayerConnect(playerid){Locked[playerid] = 0;return 1;}public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ new string[128]; format(string, sizeof(string), \"Beültél egy jármübe ID: %i\",vehicleid); SendClientMessage(playerid, COLOUR_INFORMATION, string); return 1;}public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(\"/control\", cmdtext, true, 10) == 0){ShowVehicleControlDialog(playerid);return 1;}return 0;}stock ShowVehicleControlDialog(playerid){if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){return ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG, DIALOG_STYLE_LIST, \"Jármü Menu:\", \"Motor ki/be kapcsolás\\nLámpák\\nRiasztó\\nBezárás/Kinyitás \\nMotorháztetö\\nCsomagtartó\\nRendszámtábla átirás\", \"Választ\", \"Mégse\");}else return SendClientMessage(playerid, COLOUR_INFORMATION, \"Kocsi nélkül **szhatod:]!\");}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == VEHICLE_CONTROL_DIALOG && response){switch(listitem){ case 0: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+1, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Elinditod/Leállítom az motort?\", \"Elindítom\", \"Leállítom\"); case 1: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+2, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"{0xFFFFFF}Bekapcsolod a lámpákat?\", \"Bekapcsolom\", \"Kikapcsolom\"); case 2: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+3, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Bekapcsolod a riasztót?\", \"Bekapcsolom\", \"Kikapcsolom\"); case 3: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+4, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Bezárod/feloldod a kocsidat?\", \"Feloldom\", \"Lezárom\"); case 4: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+5, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Felnyitod a motorháztetöt? \", \"Felnyitás\", \"Lecsukás\"); case 5: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+6, DIALOG_STYLE_MSGBOX, \"Jármü Menu:\", \"Felnyitod a csomagtartót?\", \"Felnyitás\", \"Lecsukás\"); case 6: ShowPlayerDialog(playerid, VEHICLE_CONTROL_DIALOG+7, DIALOG_STYLE_INPUT, \"Jármü Menu:\", \"Ird be az új rendszámot!\", \"Átirás\", \"Mégse\");}return 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+1){if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Elinditotad az Enginét!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Leálitotad az Enginét!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+2){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bekapcsoltad a lámpát!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, ON, alarm, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kikapcsoltad a lámpát!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, OFF, alarm, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+3){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bekapcsoltad a riasztót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, ON, doors, bonnet, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kikapcsoltad a riasztót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, OFF, doors, bonnet, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+4){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad az ajtókat!.\"); UnlockVehicle(GetPlayerVehicleID(playerid));}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad az ajtókat!\"); LockVehicle(playerid, GetPlayerVehicleID(playerid));}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+5){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad a motorháztetöt!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, ON, boot, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad a motorháztetöt!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, OFF, boot, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+6){ if(response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Kinyitottad a csomagtartót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, ON, objective);}if(!response){ SendClientMessage(playerid, COLOUR_INFORMATION, \"Bezártad a csomagtartót!\"); GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, OFF, objective);}#if defined AUTO_REOPEN_DIALOGShowVehicleControlDialog(playerid);#endifreturn 1;}if(dialogid == VEHICLE_CONTROL_DIALOG+7){ new string[128], Float:X, Float:Y, Float:Z, Float:angle;if(strlen(inputtext) < 1 || strlen(inputtext) > return SendClientMessage(playerid, COLOUR_ERROR, \"Rosz rendszám!\");else{ format(string, sizeof(string), \"Beálitottad a rendszám táblát erre: \'%s\'.\", inputtext); SendClientMessage(playerid, COLOUR_INFORMATION, string); GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, angle); SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); GetPlayerPos(playerid, X, Y, Z); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); SetVehicleZAngle(GetPlayerVehicleID(playerid), angle); PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);}}return 0;}public OnVehicleStreamIn(vehicleid, forplayerid){ for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i) && IsLocked[vehicleid] == 1) SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);}return 1;}stock LockVehicle(playerid, vehicleid){for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i) && i != playerid){ IsLocked[vehicleid] = 1; SetVehicleParamsForPlayer(vehicleid,i,0,1); }}}stock UnlockVehicle(vehicleid){for(new i = 0; i < MAX_PLAYERS; i ++){ if(IsPlayerConnected(i)){ IsLocked[vehicleid] = 0; SetVehicleParamsForPlayer(vehicleid,i,0,0); }}}