Jump to content

DarkyTheAngel

Membru
  • Posts

    1,005
  • Joined

  • Last visited

    Never

Everything posted by DarkyTheAngel

  1. Poti face asta folosind "textdraw"-uri, sau texte trimise jucatorului prin fereastra de chat.Pentru a schimba imaginea jucatorului recomand InterpolateCameraPos iar pentru a face comanda "/stats", foloseste format si SendClientMessage sau ShowPlayerDialog. P.S: In aceasta sectiune postezi doar daca ai erori/probleme legate de modurile de joc RolePlay sau The Godfather. Topic Locked!
  2. [pawn] if(strcmp(cmd, "/startwar", true) == 0) { if(IsPlayerConnected(playerid)) { if(wtimer[playerid] < 1) { } else { SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 12 ore la fiecare war!"); return 1; } if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 12) { provoked = 1; new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]"); return 1; } if(strcmp(x_nr,"list",true) == 0) { SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________"); SendClientMessage(playerid, COLOR_GRAD1, "1:GS/LS 2: BS/LS 3: Madd Dog House 4: Banca"); return 1; } else if(strcmp(x_nr,"1",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS"); return 1; } else if(strcmp(x_nr,"2",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS"); return 1; } else if(strcmp(x_nr,"3",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House"); return 1; } else if(strcmp(x_nr,"4",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Triads-{DBDB70}LSV{D3D3D3}-{66CD00}Grove {00FA9A}au declarat WAR , zona: {FFFFFF}Banca"); return 1; } } else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 16) { provoked = 1; new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]"); return 1; } if(strcmp(x_nr,"list",true) == 0) { SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________"); SendClientMessage(playerid, COLOR_GRAD1, "1: GS/LS 2: BS/LS 3: Madd Dog House 4: Banca"); return 1; } else if(strcmp(x_nr,"1",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS"); return 1; } else if(strcmp(x_nr,"2",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS"); return 1; } else if(strcmp(x_nr,"3",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House"); return 1; } else if(strcmp(x_nr,"4",true) == 0) { SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Mafia{D3D3D3}-{97FFFF}VLA{D3D3D3}-{CD3278}Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}Banca"); return 1; } } else { SendClientMessage(playerid, COLOR_GRAD2, "You are not a gang / mafia leader!"); return 1; } wtimer[playerid] = 3000000; } return 1; } if(strcmp(cmd, "/acceptwar", true) == 0) { if(IsPlayerConnected(playerid)) { if (provoked == 1) { if (PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 5) { new hour,minuite; gettime(hour,minuite); FixHour(hour); scoreteam1 = 0; scoreteam2 = 0; SetTimer("wartime", 1800000, false); SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|"); format(string, sizeof(string), "{006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads vS {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia"); SendClientMessageToAll(COLOR_WHITE,string); SendClientMessageToAll(COLOR_WHITE, "Premiul: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}200 {33AA33}Drugs"); format(string, sizeof(string), "War inceput la ora: {F81414}%d: %d", hour, minuite); SendClientMessageToAll(COLOR_WHITE,string); SendClientMessageToAll(COLOR_WHITE, "Va rugam evitati acea zona!"); SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|"); provoked = 0; } } else { SendClientMessage(playerid, COLOR_GREY, "You are not a Leader or a gang/mafia Leader."); } } return 1; }[/pawn] O sa mai trebuiasca sa definesti si simbolul "COLOR_GREY" si va arata cam asa: #define COLOR_GREY 0xBDBDBDFF Apoi, defineste simbolul "PlayerInfo" asa: enum pInfo { pLeader } ; new PlayerInfo [ MAX_PLAYERS ] [ pInfo ] ; Realizezi ca ai spus o mare prostie aici, nu? La inceputul "scriptului". EDIT: Vezi ca ai incalcat regulile facand "2x post".
  3. Folosesti parola la conectarea cu "localhost"-ul?
  4. O adaugi la inceputul scriptului, nu e evident?
  5. El a sters tot callback-ul nu doar RemoveBuildingForPlayer .
  6. Cu placere si multumesc! Topic Locked!
  7. Acea imagine se numeste "sprite" si o poti pune folosind un editor.Iar ca sa faci un "anunt" ca ala, iti recomand sa folosesti asta.
  8. [pawn] if(Answered == 0) { new idx; tmp = strtok(text, idx); if ((strcmp(FastString, tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(FastString))) { Answered = 1; OOCNews(COLOR_LIGHTBLUE, string); new randrd = 1000 + random(500); GivePlayerCash(playerid, randrd); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "{DC0C0C}Fast Event: {FFFFFF}%s a castigat fast-eventul si a primit $%d!", sendername, randrd); SendClientMessageToAll(0xFFFFFFFF, string); return 0; } }[/pawn]
  9. In comentariul anterior, ti-am impreunat ambele parti de cod (pe care mi le-ai dat).
  10. [pawn]public OnPlayerGiveDamage ( playerid , damagedid , Float:amount , weaponid ) { if ( Tazer [ playerid ] == 1 && GetPlayerWeapon ( playerid ) == TAZE_WEAPON ) { new string [ 128 ] , victim [ MAX_PLAYER_NAME ] , attacker [ MAX_PLAYER_NAME ] , weaponname [ 124 ] , Float:pos [ 3 ] , Float:health , losehp ; if ( Tazed [ damagedid ] == 1 ) return ( 1 ) ; GetPlayerHealth ( damagedid , health ) ; losehp = TAZE_LOSEHP ; GetPlayerPos ( damagedid , pos [ 0 ] , pos [ 1 ] , pos [ 2 ] ) ; ClearAnimations ( damagedid ) ; TogglePlayerControllable ( damagedid , 0 ) ; ApplyAnimation ( damagedid , "PED" , "KO_skid_front" , 4.1 , 0 , 1 , 1 , 1 , 0 ) ; ApplyAnimation ( damagedid , "PED" , "KO_skid_front" , 4.1 , 0 , 1 , 1 , 1 , 0 ) ; SetTimerEx ( "TazedRemove" , TAZE_TIMER , 0 , "i" , damagedid ) ; Tazed [ damagedid ] = 1 ; if ( losehp ) { } else SetPlayerHealth ( damagedid , health + amount ) ; GetPlayerName ( playerid , attacker , sizeof ( attacker ) ) ; GetPlayerName ( damagedid , victim , sizeof ( victim ) ) ; GetWeaponName ( weaponid , weaponname , sizeof ( weaponname ) ) ; format ( string , sizeof ( string ) , "%s has made %.0f damage to %s, weapon: %s" , attacker , amount , victim , weaponname ) ; SendClientMessageToAll ( 0xFFFFFFFF , string ) ; } return ( 1 ) ; }[/pawn] EDIT: Codul arata nearanjat aici, dar in editor va arata bine.
  11. Insfarsit, te-ai luminat.Acea eroare vrea sa spuna ca, callback-ul este definit de mai multe ori.
  12. Sunt singurul care vede ca a pus un callback in alt callback ?
  13. Ba da.Incearca sa reinstalezi sistemul de operare ("Windows"-ul).Eu asa am rezolvat-o.
  14. Sigur ca nu.Asa mi s-a intamplat si mie, altora le pornea "server"-ul meu, dar mie nu dar cu alte moduri de joc imi functiona.Incearca sa incerci sa il pornesti pe un alt calculator (la un prieten, ceva) si sa vezi daca functioneaza la el.Daca o sa functioneze, inseamna ca problema este de la tine.
  15. Daca vrei sa postezi ceva, trebuie sa postezi si "link"-ul de descarcare. Daca nu vrei sa o copieze lumea, de ce o mai postezi? Atunci cand postezi ceva trebuie sa sti riscurile la care te supui.
  16. Mi s-a intamplat si mie chestia asta de curand.Aceasta problema poate fi provocata de cod sau de sistemul de operare (adica de Windows).Nu sunt 100% sigur daca reinstalarea sistemului de operare va fixa problema.
  17. "Cooler"-ul nu foloseste "pasta" ci "ulei", din cate stiu eu.
  18. Din cate vezi tu, noi respectam un regulament la aceasta sectiune, iar in acel regulament scrie clar ca nu ai voie sa faci "bump" sau "2x post" decat dupa 24 de ore de la ultimul post in topicul respectiv iar odata ce ai incalcat aceasta regula, trebuie sa iti inchid topicul. Realizezi ca trebuie sa il ai doar odata, nu?
  19. Deja imi dau seama ca tu explodezi la cate cunostinte in scripting ai, asa ca o sa iti dau un exemplu (defapt, ceva mai mult de un exemplu): #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new bool: lights_status [ MAX_PLAYERS ] , vehicleid = GetPlayerVehicleID ( playerid ) , engine , lights , alarm , doors , bonnet , boot , objective ; public OnPlayerKeyStateChange ( playerid , newkeys , oldkeys ) { if ( PRESSED ( KEY_FIRE ) && lights_status [ playerid ] == false ) { if ( IsPlayerInAnyVehicle ( playerid ) ) { GetVehicleParamsEx ( vehicleid , engine , lights , alarm , doors , bonnet , boot , objective ) ; SetVehicleParamsEx ( vehicleid , engine , 1 , alarm , doors , bonnet , boot , objective ) ; lights_status [ playerid ] = true ; } } if ( PRESSED ( KEY_FIRE ) && lights_status [ playerid ] == true ) { if ( IsPlayerInAnyVehicle ( playerid ) ) { GetVehicleParamsEx ( vehicleid , engine , lights , alarm , doors , bonnet , boot , objective ) ; SetVehicleParamsEx ( vehicleid , engine , lights , alarm , doors , bonnet , boot , objective ) ; lights_status [ playerid ] = false ; } } return ( 1 ) ; } Nu cred ca mai e nevoie sa explic ce face fiecare functie in parte pentru ca, cred eu, o sa o fac degeaba.Succes!
  20. Asta-i sectiunea de "off-topic" deci putem vorbi despre orice.
  21. Ma crezi ca sunt la liceu si am "5" la matematica ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.