~Hunt3r~
-
Posts
53 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
News
Documentation
Posts posted by ~Hunt3r~
-
-
Este un script cu foarte putine linii dar m-am gandit totusi sa-l postez
edt
Comenzi :
/daban
/dakick
Cine scrie una din aceste comenzi (ex: /daban ) va lua ban direct , ii va aparea motivul si un mesaj to All cum ca si-a dat ban singur...
Ps: mesajele le puteti modifica dupa plac !
<a href="http://solidfiles.com/d/xXvw"><img src="http://solidfiles.com/info_imgs/xXvw.jpg" alt="Mic_script.zip" /></a>
-
Bun , nu te descuraja si continua sa avansezi !
-
Bun tutorial !
-
Engine Sistem
Am facut un engine sistem,adica daca apesi tasta Shift motorul porneste,iar cand apesi enter iesi din masina si opresti si mororul.
color=green]Comenzi
Shift= Start engine
Enter = Exit veh and stop engine
/exitveh = daca Enter nu merge
Code:
#include <a_samp> #define SCM SendClientMessage #define COLOR_PURPLE 0xC2A2DAAA new VehicleStarted[MAX_VEHICLES]; new sendername[MAX_PLAYER_NAME]; new BigEar[MAX_PLAYERS]; forward Starting(playerid); forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5); public OnFilterScriptInit() { print("-------------------------------------"); print("-----Engine System By Andybtv-----"); new Car; for(Car=0;Car<MAX_VEHICLES;Car++) return 1; return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/exitcar", cmdtext, true, 10) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { RemovePlayerFromVehicle(playerid); SCM(playerid,0xFFFF00AA,"* You left the vehicle."); TogglePlayerControllable(playerid,1); }else{ SCM(playerid,0xFFFF00AA,"* You are not in a vehicle!"); } } return 1; } return 0; } public OnPlayerStateChange(playerid, newstate, oldstate) { new CarID = GetPlayerVehicleID(playerid); new CarMod = GetVehicleModel(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(VehicleStarted[CarID] == 0 && CarMod != 510 && CarMod != 509 && CarMod != 481) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 510 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 509 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 481){ return 1; } TogglePlayerControllable(playerid,0); SCM(playerid,0x950000FF,"* Please Start The Engine Use Key: Shift"); }else{ SCM(playerid,0x80FF80FF,"* The Engine Is Already Running!"); } } return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & (KEY_SECONDARY_ATTACK)) == (KEY_SECONDARY_ATTACK)) { if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(playerid)) { new Vehicle = GetPlayerVehicleID(playerid); if(VehicleStarted[Vehicle] == 0) { RemovePlayerFromVehicle(playerid); SCM(playerid,0x0000FFFF,"* You Leave The Vehicle And Switch Off The Engine."); TogglePlayerControllable(playerid,1); } } } } if(newkeys == KEY_JUMP) { if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(playerid)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 510 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 509 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 481){ return 1; } new Vehicle = GetPlayerVehicleID(playerid); if(VehicleStarted[Vehicle] == 0) { new string[256]; SCM(playerid,0x80FF80FF,"* Starting Engine..."); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s attempts to start the Engine.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~g~Starting vehicle...",3000,3); SetTimerEx("Starting",3500,0,"i",playerid); } } } } return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { TogglePlayerControllable(playerid,1); new Vehicle = GetPlayerVehicleID(playerid); VehicleStarted[Vehicle] = 0; return 1; } public Starting(playerid) { new Vehicle = GetPlayerVehicleID(playerid); new RandomStart; if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { RandomStart = random(10); switch(RandomStart) { case 0,1,2,3,4,5,6,7,8,9: { new string[256]; VehicleStarted[Vehicle] = 1; TogglePlayerControllable(playerid,1); GameTextForPlayer(playerid,"~r~Engine Started", 1000, 1); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s starts the Engine.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } case 10: { new string[256]; SendClientMessage(playerid,0xFF1C1CFF,"* Engine Failed To Start!"); format(string, sizeof(string), "* %s fails to start the Engine.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } } } } return 1; } public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(!BigEar[i]) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, string); } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { SendClientMessage(i, col2, string); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, string); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, string); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, string); } } else { SendClientMessage(i, col1, string); } } } } return 1; } strtok(const string[], &index, const seperator[] = " ") { new index2, result[30]; index2 = strfind(string, seperator, false, index); if(index2 == -1) { if(strlen(string) > index) { strmid(result, string, index, strlen(string), 30); index = strlen(string); } return result; } if(index2 > (index + 29)) { index2 = index + 29; strmid(result, string, index, index2, 30); index = index2; return result; } strmid(result, string, index, index2, 30); index = index2 + 1; return result; } #pragma unused strtok
Credits
Eu: Andybtv
Si sa-mp.com pt ajutor.
Liber pentru modificari,daca vreti,pastrati creditele daca nu,nu
Cat de greu crezi ca e sa schimbi in loc de comanda un buton anume
Sa fim seriosi , daca era muncit de tine cu adevarat nu cred ca mai spuneai asta: ,,
Liber pentru modificari,daca vreti,pastrati creditele daca nu,nu''
-
-
Interesant si distractiv. Buna treaba !
-
Frumoasa Mapa!
-
Cate idei mai aveti . Folositoare mapa , bv !
-
Buna treaba 8) !
-
Ma admine el a cerut ajutorul pe acest forum nu a cerut ajutorul celor de la forumul oficial !!! asa ca mai bn lai ajuta tu nu sal alungi ca doar esti admin !!!
Nu-l alunga nimeni , el doar i-a dat un sfat ! Don't strees man ! ::)
-
Buna si pt sv cs ! Nice!
-
Mica dar Frumoasa . ;)
-
Uploadeaza pozele pe Aici ca se misca mai repede !
-
soper idee dar ar fi mai bn daca era facuta undeva departe !!!
DAR E COOL ;D ;D :
Cat de departe...? Ideea e ca a avut inspiratie buna ! Good Map heatON !
-
Bv man !
-
INventiv , Nice work!
-
Nice work !
-
Gj, asa mai merge !
-
uiteti dovada ;) http://forum.sa-mp.com/index.php?topic=119909.0
Ala e postul meu .
-
este bun dar pacat ca nu e facut de tn !!! si am opservat si la celelante filterscripturi ca nus facute de voi =)) nu sunteti in stare sa faceti nici macar un FS !! voi doar stiti sa traduceti =))
WTF ? Arata-mi dovada inainte de a comenta ! Normal ca e facut de mine , nu mai posta aiurea pe forum and Fu*K YoU !
-
http://pastebin.com/m5fbb9848
-
CU acest script puteti sa faceti masina invizibila
Pretul este de 3500$ , desigur puteti sa-l modificat si la 1$
Comenzi :
/invizibil
/vizibil
-
Deci banuiesc ca multi dintre voi ati intrat in ,,scriptfiles'' si acolo atzi gasit un folder de genu' ,,vehiclelists'' .Daca ati intrat in acele fisiere notepad de ex: ,,red_county.txt'' ati gasit niste coordonate fara ,,AddStaticVehicle'' inclus sau altceva
Acele coordonate sunt ale masinilor din jok puse intr-o ordine (ca la SinglePlayer)
Pt a pune acele vehicule pe server fara a mai adauga ,,AddStaticVehicle'' sau altceva faceti urmatoarele:
1. Deschideti GM vostru
2. Cautati
public OnGameModeInit()
Si adaugati acolo :new total_vehicles_from_files=0; total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/red_county.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/lv_gen.txt");
Aici puteti adauga mai multe vehicule din folder-ul vehiclelists , eu am adaugat doar 2 exemple .Deci pt a baga si altele cu ar fi ,, whetstone.txt '' schimbati de ex:red_county.txt
din cod-ul de mai sus cuwhetstone.txt
si va iesi asa:total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/whetstone.txt");
Iar dupa aceia punem dupapublic OnGameModeExit() { return 1; }
Asta:LoadStaticVehiclesFromFile(const filename[]) { new File:file_ptr; new line[256]; new var_from_line[64]; new vehicletype; new Float:SpawnX; new Float:SpawnY; new Float:SpawnZ; new Float:SpawnRot; new Color1, Color2; new index; new vehicles_loaded; file_ptr = fopen(filename,filemode:io_read); if(!file_ptr) return 0; vehicles_loaded = 0; while(fread(file_ptr,line,256) > 0) { index = 0; // Read tip index = token_by_delim(line,var_from_line,',',index); if(index == (-1)) continue; vehicletype = strval(var_from_line); if(vehicletype < 400 || vehicletype > 611) continue; // Read X, Y, Z, Rotation index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnX = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnY = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnZ = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnRot = floatstr(var_from_line); // Read Color1, Color2 index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; Color1 = strval(var_from_line); index = token_by_delim(line,var_from_line,';',index+1); Color2 = strval(var_from_line); //printf("%d|%f|%f|%f|%f|%d|%d",vehicletype, //SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2); AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,-1); vehicles_loaded++; } fclose(file_ptr); printf("Loaded %d vehicles from: %s",vehicles_loaded,filename); return vehicles_loaded; } //-------------------------------------------------------------------------------------------- token_by_delim(const string[], return_str[], delim, start_index) { new x=0; while(string[start_index] != EOS && string[start_index] != delim) { return_str[x] = string[start_index]; x++; start_index++; } return_str[x] = EOS; if(string[start_index] == EOS) start_index = (-1); return start_index; }
Si teoretic va trebui sa va apara masinile joc . Mai complet ar trebui sa a iasa asa:public OnGameModeInit() { //NewCars new total_vehicles_from_files=0; total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/lv_gen.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/bone.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehiclelists/sf_airport.txt"); } public OnGameModeExit() { return 1; } LoadStaticVehiclesFromFile(const filename[]) { new File:file_ptr; new line[256]; new var_from_line[64]; new vehicletype; new Float:SpawnX; new Float:SpawnY; new Float:SpawnZ; new Float:SpawnRot; new Color1, Color2; new index; new vehicles_loaded; file_ptr = fopen(filename,filemode:io_read); if(!file_ptr) return 0; vehicles_loaded = 0; while(fread(file_ptr,line,256) > 0) { index = 0; // Read type index = token_by_delim(line,var_from_line,',',index); if(index == (-1)) continue; vehicletype = strval(var_from_line); if(vehicletype < 400 || vehicletype > 611) continue; // Read X, Y, Z, Rotation index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnX = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnY = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnZ = floatstr(var_from_line); index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; SpawnRot = floatstr(var_from_line); // Read Color1, Color2 index = token_by_delim(line,var_from_line,',',index+1); if(index == (-1)) continue; Color1 = strval(var_from_line); index = token_by_delim(line,var_from_line,';',index+1); Color2 = strval(var_from_line); //printf("%d|%f|%f|%f|%f|%d|%d",vehicletype, //SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2); AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,-1); vehicles_loaded++; } fclose(file_ptr); printf("Loaded %d vehicles from: %s",vehicles_loaded,filename); return vehicles_loaded; } //------------------------------------------------------------------------------------- token_by_delim(const string[], return_str[], delim, start_index) { new x=0; while(string[start_index] != EOS && string[start_index] != delim) { return_str[x] = string[start_index]; x++; start_index++; } return_str[x] = EOS; if(string[start_index] == EOS) start_index = (-1); return start_index; }
La mn a functionat ,orasul Lv era gol si dupa ce am pus asta in acel Gm au aparut masinile ,deci nu vad dc nu ar merge si la voi.
-
Look This -->> http://forum.sa-mp.com/index.php?topic=98209.msg623920#msg623920 e doar un map dar totusi nu-am mintit .
Or This -->>
Is Funy
Cum adaugam o masina tunata in mod/filterscript
in Tutoriale
Posted
Folositor ! 8)