23.01.2013, 17:53
My script is only 600 lines, here you about 50 of them that i changed.
Код:
#include <a_samp> #include <core> #include <float> #include <dini> #pragma tabsize 0 //---------------------------------------------------------- #define USERFILE "users.txt" #define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1 #define COLOR_WHITE 0xFFFFFFFF #define COLOR_NORMAL_PLAYER 0xFFFFFFFF #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new Tick[MAX_PLAYERS]; public OnPlayerUpdate(playerid) { Tick[playerid]++; if(Tick[playerid] != 3) return 1; Tick[playerid] = 0; new Keys,up,down; GetPlayerKeys(playerid,Keys,up,down); new Float:x,Float:y,Float:z; if(Keys &= 1024) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { GetPlayerVelocity(playerid,x,y,z); SetPlayerVelocity(playerid,x*1.2,y*1.2,z*1.2); } } else if(Keys &= 4) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z); SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2); } } return 1; } new total_vehicles_from_files=0; // Class selection globals new gPlayerCitySelection[MAX_PLAYERS]; new gPlayerHasCitySelected[MAX_PLAYERS]; new gPlayerLastCitySelectionTick[MAX_PLAYERS]; new Text:txtClassSelHelper; new Text:txtLosSantos; new Text:txtSanFierro; new Text:txtLasVenturas; new thisanimid=0; new lastanimid=0; public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3); } return 1; }