#include <a_samp>#define PRESSED(%0) \\(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if(PRESSED(KEY_FIRE)){new State = GetPlayerState(playerid);if(State == PLAYER_STATE_DRIVER){ new JarmuID = GetPlayerVehicleID(playerid); new Float: sbX, Float: sbY, Float: sbZ; GetVehicleVelocity( JarmuID, sbX, sbY, sbZ ); SetVehicleVelocity( JarmuID, sbX * 1.15, sbY * 1.15, sbZ); }}if(PRESSED(KEY_WALK)){new State = GetPlayerState(playerid);if(State == PLAYER_STATE_DRIVER){ new vehicleID = GetPlayerVehicleID(playerid); new Float: cjX, Float: cjY, Float: cjZ; GetVehicleVelocity(vehicleID, cjX, cjY, cjZ ); SetVehicleVelocity(vehicleID, cjX , cjY , cjZ + 0.2);}}if(PRESSED(KEY_JUMP)){ new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); new Float: tbA; GetVehicleZAngle(vehicleID, tbA); SetVehicleZAngle(vehicleID, tbA+180); }}if(PRESSED(KEY_SUBMISSION)){new State = GetPlayerState(playerid);if(State == PLAYER_STATE_DRIVER){ new vehicleID = GetPlayerVehicleID(playerid); SetVehicleVelocity(vehicleID,0.0,0.0,0.0);}}return 1;}
#include <a_samp>#include <sscanf2>#define PRESSED(%0) \\(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))new SB[MAX_PLAYERS] = 1;new CJ[MAX_PLAYERS] = 1;new TB[MAX_PLAYERS] = 1;new B[MAX_PLAYERS] = 1; public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if(PRESSED(KEY_FIRE)){ if(SB[playerid] == 0) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new JarmuID = GetPlayerVehicleID(playerid); new Float: sbX, Float: sbY, Float: sbZ; GetVehicleVelocity( JarmuID, sbX, sbY, sbZ ); SetVehicleVelocity( JarmuID, sbX * 1.15, sbY * 1.15, sbZ); }}}if(PRESSED(KEY_WALK)){ if(CJ[playerid] == 0) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); new Float: cjX, Float: cjY, Float: cjZ; GetVehicleVelocity(vehicleID, cjX, cjY, cjZ ); SetVehicleVelocity(vehicleID, cjX , cjY , cjZ + 0.2); }}}if(PRESSED(KEY_JUMP)){ if(TB[playerid] == 0) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); new Float: tbA; GetVehicleZAngle(vehicleID, tbA); SetVehicleZAngle(vehicleID, tbA+180); }}}if(PRESSED(KEY_SUBMISSION)){ if(B[playerid] == 0) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); SetVehicleVelocity(vehicleID,0.0,0.0,0.0); }}}return 1;}public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmdtext, \"/speedboost\", true) == 0) { new i_str[4]; if(sscanf(cmdtext, \"s[4]\", i_str)) { SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /speedboost [on/off]\"); return 1;}if(strcmp(i_str, \"on\", true) == 0){ if(SB[playerid] == 0) { SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /speedboost off\"); } else { SB[playerid] = 0; }}if(strcmp(i_str, \"off\", true) == 0){ if(SB[playerid] == 1) { SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /speedboost on\"); } else { SB[playerid] = 1; }}return 1;} if(strcmp(cmdtext, \"/carjump\", true) == 0) { new i_str[4]; if(sscanf(cmdtext, \"s[4]\", i_str)) { SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /carjump [on/off]\"); return 1;}if(strcmp(i_str, \"on\", true) == 0){ if(CJ[playerid] == 0) { SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /carjump off\"); } else { CJ[playerid] = 0; }}if(strcmp(i_str, \"off\", true) == 0){ if(CJ[playerid] == 1) { SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /carjump on\"); } else { CJ[playerid] = 1; }}return 1;}if(strcmp(cmdtext, \"/180\", true) == 0) { new i_str[4]; if(sscanf(cmdtext, \"s[4]\", i_str)) { SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /180 [on/off]\"); return 1;}if(strcmp(i_str, \"on\", true) == 0){ if(TB[playerid] == 0) { SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /180 off\"); } else { TB[playerid] = 0; }}if(strcmp(i_str, \"off\", true) == 0){ if(TB[playerid] == 1) { SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /180 on\"); } else { TB[playerid] = 1; }}return 1;}if(strcmp(cmdtext, \"/break\", true) == 0) { new i_str[4]; if(sscanf(cmdtext, \"s[4]\", i_str)) { SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /break [on/off]\"); return 1;}if(strcmp(i_str, \"on\", true) == 0){ if(B[playerid] == 0) { SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /break off\"); } else { B[playerid] = 0; }}if(strcmp(i_str, \"off\", true) == 0){ if(B[playerid] == 1) { SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /break on\"); } else { B[playerid] = 1; }}return 1;}return 0;}
#include <a_samp>#include <zcmd>#include <sscanf2>#define PRESSED(%0) \\ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))new bool:SB[MAX_PLAYERS] = false;new bool:CJ[MAX_PLAYERS] = false;new bool:TB[MAX_PLAYERS] = false;new bool:B[MAX_PLAYERS] = false; public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(PRESSED(KEY_FIRE)) { if(SB[playerid] == true) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new JarmuID = GetPlayerVehicleID(playerid); new Float: sbX, Float: sbY, Float: sbZ; GetVehicleVelocity( JarmuID, sbX, sbY, sbZ ); SetVehicleVelocity( JarmuID, sbX * 1.15, sbY * 1.15, sbZ); } } } if(PRESSED(KEY_WALK)) { if(CJ[playerid] == true) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); new Float: cjX, Float: cjY, Float: cjZ; GetVehicleVelocity(vehicleID, cjX, cjY, cjZ ); SetVehicleVelocity(vehicleID, cjX , cjY , cjZ + 0.2); } } } if(PRESSED(KEY_JUMP)) { if(TB[playerid] == true) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); new Float: tbA; GetVehicleZAngle(vehicleID, tbA); SetVehicleZAngle(vehicleID, tbA+180); } } } if(PRESSED(KEY_SUBMISSION)) { if(B[playerid] == true) { new State = GetPlayerState(playerid); if(State == PLAYER_STATE_DRIVER) { new vehicleID = GetPlayerVehicleID(playerid); SetVehicleVelocity(vehicleID,0.0,0.0,0.0); } } } return 1;}CMD:speedboost(playerid, params[]){ new i_str[4];if(sscanf(params, \"s\", i_str)) return SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /speedboost [on/off]\"); if(strcmp(i_str, \"on\", true) == 0) { if(SB[playerid] == true) SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /speedboost off\"); else SB[playerid] = true;}else if(strcmp(i_str, \"off\", true) == 0){if(SB[playerid] == false) SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /speedboost on\");else SB[playerid] = false; } return 1;}CMD:carjump(playerid, params[]){new i_str[4]; if(sscanf(params, \"s\", i_str)) return SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /carjump [on/off]\"); if(strcmp(i_str, \"on\", true) == 0) {if(CJ[playerid] == true) SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /carjump off\");else CJ[playerid] = true;}else if(strcmp(i_str, \"off\", true) == 0){if(CJ[playerid] == false) SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /carjump on\");else CJ[playerid] = false;}return 1;}CMD:180(playerid, params[]){new i_str[4];if(sscanf(params, \"s\", i_str)) return SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /180 [on/off]\");if(strcmp(i_str, \"on\", true) == 0){if(TB[playerid] == true) SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /180 off\");else TB[playerid] = true;}else if(strcmp(i_str, \"off\", true) == 0){if(TB[playerid] == false) SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /180 on\");else TB[playerid] = false;}return 1;}CMD:break(playerid, params[]){new i_str[4];if(sscanf(params, \"s\", i_str)) return SendClientMessage(playerid, 0x00FFFFAA, \"Használat: /break [on/off]\");if(strcmp(i_str, \"on\", true) == 0){if(B[playerid] == true) SendClientMessage(playerid, 0x00FFFFAA, \"Te már bekapcsoltad! /break off\"); else B[playerid] = true; }else if(strcmp(i_str, \"off\", true) == 0){if(B[playerid] == false) SendClientMessage(playerid, 0x00FFFFAA, \"Ki van kapcsolva! /break on\");else B[playerid] = false;}return 1;}