#include a_samp#define OFF 0#define ON 1//SpeedBoostnew globC;//CarJumpnew glob10;//HyperStopnew globS;//Motorháztetõnew globB;//Csomagtartónew globnB;//Riasztónew globA;//Motornew globE;new bool:booot=false;new bool:boonet=false;new engine, lights, alarm, doors, bonnet, boot, objective;// -----------------------------------------------------------------------------public OnFilterScriptInit(){ print(\"\\n\");print(\"------------------------------\");print(\"Vkey system by Filip [2012] \");print(\"------------------------------\");print(\"\\n\");return 1;}//------------------------------------------------------------------------------public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/vkey\", true) == 0){ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,\"Vkey rendszer by {0d00ff}Filip\",\"{127a04}SpeedBoost\\n{056cf2}CarJump\\n{ff0000}HyperStop\\n{ff0000}Motorháztetö\\n{ff0000}Csomagtarto\\n{ff0000}Riasztó\\n{ff0000}Motor\\n{ff0000}Összes Kikapcsolása\",\"BEKAPCSOL\",\"Mégse\");return 1;}return 0;}//------------------------------------------------------------------------------public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid==1 && response==1){ switch(listitem) { case 0: { globC = 1; SendClientMessage(playerid,0x0009ffAA,\"Bekapcsoltad a SpeedBoost Módot. A KEY_SUBMISSION (2-es) gombal tudod aktiválni.\"); } case 1: { glob10 = 1; SendClientMessage(playerid,0x0009ffAA,\"Bekapcsoltad a CarJump módot. A KEY_SUBMISSION (2-es) gombal tudod aktiválni.\"); } case 2: { globS = 1; SendClientMessage(playerid,0x0009ffAA,\"Bekapcsoltad a Hyper Stop módot. A KEY_SUBMISSION (2-es) gombal tudod aktiválni.\"); } case 3: { globB = 1; SendClientMessage(playerid,0x0009ffAA,\"Kitudod nyitni a motorháztetõt. A KEY_SUBMISSION (2-es) gombal tudod aktiválni.\"); } case 4: { globnB = 1; SendClientMessage(playerid,0x0009ffAA,\"Kitudod nyitni a csomagtartót. A KEY_SUBMISSION (2-es) gombal tudod aktiválni.\"); } case 5: { globA = 1; SendClientMessage(playerid,0x0009ffAA,\"Riasztó bekapcsolása a KEY_SUBMISSION (2-es) gombal.\"); } case 6: { globE = 1; SendClientMessage(playerid,0x0009ffAA,\"Motor ki/be kapcsolása a KEY_SUBMISSION (2-es) gombal.\"); } case 7: { glob10 = 0; globC = 0; globS = 0; globB = 0; globnB = 0; globA = 0; globE = 0; SendClientMessage(playerid,0x0009ffAA,\"Kikapcsoltad az összes módot\"); } }}return 1;}//------------------------------------------------------------------------------public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){new engin;if(newkeys & KEY_SUBMISSION) {if(glob10 == 1){ new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + 0.3); }if(globC == 1){ new Float:vx,Float:vy,Float:vz;GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.3, vy *1.3, vz * 1.3); }if(globS == 1){ SetVehicleVelocity(GetPlayerVehicleID(playerid) ,0.0 ,0.0 ,0.0); }if(globB == 1){ GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, ON, objective);booot=true; } else if( booot ) { SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, OFF, objective); booot=false;}if(globnB == 1){if( !boonet ){ GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, ON, boot, objective);boonet=true;} } else if( boot ) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, OFF, boot, objective); boonet=false;}if(globA == 1){ GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, ON, doors, bonnet, boot, objective);}if(globE == 1){ GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective);engine=true;}else if( engin ) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective); engine=false;}} return 1;}
[pawn]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if(newkeys & KEY_FIRE) { if(glob10 == 1) { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + 0.3); } } if(newkeys & KEY_FIRE) { if(globC == 1) { new Float:vx,Float:vy,Float:vz; GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz); SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.3, vy *1.3, vz * 1.3); } } if(newkeys & KEY_FIRE) { if(globS == 1) { SetVehicleVelocity(GetPlayerVehicleID(playerid) ,0.0 ,0.0 ,0.0); }} if(newkeys & KEY_FIRE) { if(globB == 1) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, ON, objective); booot=true; } else if( booot ) { SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, OFF, objective); booot=false; }} if(newkeys & KEY_FIRE) { if(globnB == 1) { if( !boonet ) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, ON, boot, objective); boonet=true; } } else if( boot ) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, OFF, boot, objective); boonet=false; }}if(newkeys & KEY_FIRE) { if(globA == 1) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, ON, doors, bonnet, boot, objective); }}if(newkeys & KEY_FIRE) { if(globE == 1) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), ON, lights, alarm, doors, bonnet, boot, objective); engine=true; } else if( engin ) { GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(GetPlayerVehicleID(playerid), OFF, lights, alarm, doors, bonnet, boot, objective); engine=false; }} return 1;}[/pawn][/quote]Nem egybe kéne írni az összeset? mivel sok a KEY_FIRE
Tiéd se megy most nézem XD lol de figyu ha már javítod ezeket beletehetnéd
case 2: { globS = 1; SendClientMessage(playerid,0x0009ffAA,\"Bekapcsoltad a Hyper Stop módot. A Nitró(KEY_FIRE) gombal tudod aktiválni.\"); }
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,\"Vkey rendszer by: BoOy\",\"{127a04}SpeedBoost\\n{056cf2}CarJump\\n{ff0000}HyperStop\\n{ff0000}Motorháztetö\\n{ff0000}Csomagtarto\\n{ff0000}Riasztó\\n{ff0000}Motor\\n{ff0000}Összes Kikapcsolása\",\"BEKAPCSOL\",\"Mégse\");