#include <a_samp>new Float:Speed[MAX_PLAYERS];new Float:Jump[MAX_PLAYERS];public OnFilterScriptInit(){for (new i = 0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i) && !IsPlayerNPC(i)) { Speed = 1.25; }}for (new i = 0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i) && !IsPlayerNPC(i)) { Jump = 0.2; }}return 1;} public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/speedon\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0x00CC00AA,\"Jármû gyorsítás bekapcsolva. A num 8 billentyûvel tudsz gyorsítani, ha jármûben vagy.\");new name[24], string[128];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"%s bekapcsolta a jármû gyorsítást!\", name);SendClientMessageToAll(0x00CC00AA, string); Speed[playerid] = 1.25; return 1; }if (strcmp(\"/speedoff\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0xFF0000AA,\"Jármû gyorsítás kikapcsolva.\"); new name[24], string[128];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"%s kikapcsolta a jármû gyorsítást!\", name);SendClientMessageToAll(0xFF0000AA, string); Speed[playerid] = 1.00; return 1; } if (strcmp(\"/jumpon\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0x00CC00AA,\"Jármû ugrás bekapcsolva. A H billentyûvel tudsz ugrani, ha jármûben vagy.\");new name[24], string[128];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"%s bekapcsolta a jármû ugrást!\", name);SendClientMessageToAll(0x00CC00AA, string); Jump[playerid] = 0.2; return 1; }if (strcmp(\"/jumpoff\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0xFF0000AA,\"Jármû ugrás kikapcsolva.\"); new name[24], string[128];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"%s kikapcsolta a jármû ugrást!\", name);SendClientMessageToAll(0xFF0000AA, string); Jump[playerid] = 0.0; return 1; }return 0;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){//=========================================================================================//Carjump: if(newkeys & KEY_CROUCH) { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + Jump[playerid]); }//=========================================================================================//SpeedBoost:if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER){ if (newkeys & KEY_ANALOG_UP) { new Float:vx, Float:vy, Float:vz; GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz); if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3) { SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * Speed[playerid], vy * Speed[playerid], vz * Speed[playerid]); } return 1; }
#include <a_samp>new Float:Speed[MAX_PLAYERS];new Float:Jump[MAX_PLAYERS];public OnFilterScriptInit(){for (new i = 0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i) && !IsPlayerNPC(i)) { Speed = 1.25; }}for (new i = 0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i) && !IsPlayerNPC(i)) { Jump = 0.2; }}return 1;} public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/speedon\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0x00CC00AA,\"Jármû gyorsítás bekapcsolva. A num 8 billentyûvel tudsz gyorsítani, ha jármûben vagy.\"); Speed[playerid] = 1.25; return 1; }if (strcmp(\"/speedoff\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0xFF0000AA,\"Jármû gyorsítás kikapcsolva.\"); Speed[playerid] = 1.00; return 1; } if (strcmp(\"/jumpon\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0x00CC00AA,\"Jármû ugrás bekapcsolva. A H billentyûvel tudsz ugrani, ha jármûben vagy.\"); Jump[playerid] = 0.2; return 1; }if (strcmp(\"/jumpoff\", cmdtext, true, 10) == 0) { SendClientMessage(playerid,0xFF0000AA,\"Jármû ugrás kikapcsolva.\"); Jump[playerid] = 0.0; return 1; }return 0;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){//=========================================================================================//Carjump: if(newkeys & KEY_CROUCH) { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z + Jump[playerid]); }//=========================================================================================//SpeedBoost:if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER){ if (newkeys & KEY_ANALOG_UP) { new Float:vx, Float:vy, Float:vz; GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz); if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3) { SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * Speed[playerid], vy * Speed[playerid], vz * Speed[playerid]); } return 1; }
if (strcmp(\"/speedon\", cmdtext, true, 10) == 0) { if(Speed[playerid]==1.00) SendClientMessage(playerid,0x00CC00AA,\"Jármû gyorsítás bekapcsolva. A num 8 billentyûvel tudsz gyorsítani, ha jármûben vagy.\");new name[24], string[128];GetPlayerName(playerid, name, sizeof(name));format(string, sizeof(string), \"%s bekapcsolta a jármû gyorsítást!\", name);SendClientMessageToAll(0x00CC00AA, string);Speed[playerid] = 1.25; if(Speed[playerid]==1.25) SendClientMessage(playerid,0xFF0000AA,\"A jármû gyorsítás már be van kapcsolva.\"); return 1; }