Jump to content

Mister

Moderator
  • Posts

    1,884
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Mister

  1. Mafia. if(PlayerInfo[playerid][pCash] >= 10000) Tu ai pus if(PlayerInfo[playerid][pCash] <= 10000)
  2. Cum ai pus tu mai sus inseamna daca playerul are bani pe minus 1000 Ca sa iti ia bani din mana pui acolo la setplayerpos playerdata [playerid][pcash] -= 1000;
  3. incearca asa if(strcmp(cmd, "/dmv", true) == 0) { if (PlayerToPoint(0.8, playerid,246.4011, 118.7430, 1003.2187)) { if(GetPlayerMoney(playerid) > 10000) { if(PlayerInfo[playerid][pCarLic] == 0) { if(DMVPrepare[playerid] == 0) { SetPlayerPos(playerid, -2311.7415,-1637.7587,483.2643); SetPlayerInterior(playerid, 3); } else { SendClientMessage(playerid,COLOR_GREY,"Nu esti la locul teleportarii!"); } } else { SendClientMessage(playerid,COLOR_GREY,"Deja ai licenta de sofer!" ); } } } else { SendClientMessage(playerid,COLOR_GREY,"Nu ai bani pentru a te teleporta!"); } return 1; }
  4. Mister

    Faction Chat

    Salut, poate atunci cand te faci lider la factiunile respective, iti da rank 0 sau mai mare de 6. Pune la id 18 asa: si pune-te lider si incearca sa scrii. else if(member == 18 || lider == 18) { if(PlayerData[playerid][pRank] == 6) { format(string, sizeof(string), "((Primar %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else if(PlayerData[playerid][pRank] == 5) { format(string, sizeof(string), "((Vice-Primar %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else if(PlayerData[playerid][pRank] == 4) { format(string, sizeof(string), "((Secretar %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else if(PlayerData[playerid][pRank] == 3) { format(string, sizeof(string), "((Secretar %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else if(PlayerData[playerid][pRank] == 2) { format(string, sizeof(string), "((Secretar %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else if(PlayerData[playerid][pRank] == 1) { format(string, sizeof(string), "((Sofer %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } else { format(string, sizeof(string), "((Membru in factiune %s: %s ))", sendername, result); SendFamilyMessage(PlayerData[playerid][pMember], TEAM_AZTECAS_COLOR, string); } }
  5. Salut, asta te ajuta? if(strcmp(cmd, "/dmv", true) == 0) { if (PlayerToPoint(0.8, playerid,246.4011, 118.7430, 1003.2187)) { if(PlayerInfo[playerid][pCash] > 10000) { if(PlayerInfo[playerid][pCarLic] == 0) { if(DMVPrepare[playerid] == 0) { SetPlayerPos(playerid, -2311.7415,-1637.7587,483.2643); SetPlayerInterior(playerid, 3); } else { SendClientMessage(playerid,COLOR_GREY,"Nu esti la locul teleportarii!"); } } else { SendClientMessage(playerid,COLOR_GREY,"Deja ai licenta de sofer!" ); } } } else { SendClientMessage(playerid,COLOR_GREY,"Nu ai bani pentru a te teleporta!"); } return 1; }
  6. UP. Nu merge, stie cineva?
  7. Nu inteleg. Ce face acel sscanf? sscanf(Date, "p<|>s[24]dd", ppName, LeaderLevel, status); Eu nu am comenzi pe sscanf, din cate inteleg trebuie sa scriu gen: /leaders 2 ? pentru a vedea liderii factiunii 2? Pentru ca eu vreau sa scriu /leaders si sa arate toti liderii. Si la linia acea de mai sus da eroarea asta. (36173) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error.
  8. Uite ce se intampla cand actualizez la versiunea mysql r39-2 :| Copypawnoincludesaveacc.inc(478) : error 035: argument type mismatch (argument 1) X 26 Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
  9. EDIT: Mafia. folosesc r5 /* SA-MP MySQL plugin R5 Copyright © 2008-2010, G-sTyLeZzZ */
  10. Problema intalnita (descriere): nu merge comanda /leaders imi da erori la stock Ero(area / rile) / warning-(ul / urile): (741) : error 017: undefined symbol "SQL" (741) : warning 213: tag mismatch (742) : error 017: undefined symbol "cache_get_data" (743) : error 017: undefined symbol "cache_delete" (741) : warning 204: symbol is assigned a value that is never used: "Result" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 3 Errors. (729) : error 017: undefined symbol "SQL" (729) : warning 213: tag mismatch (730) : error 017: undefined symbol "cache_get_data" (732) : error 017: undefined symbol "cache_get_field_content" (732) : warning 202: number of arguments does not match definition (733) : error 017: undefined symbol "cache_delete" (729) : warning 204: symbol is assigned a value that is never used: "Result" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase Liniile de cod / sursa / script-ul(obligatoriu): stock GetFactionLeader( FactionID ) { new szString[ 128 ], Cache: Result, Get[ 2 ], szLeaderName[ MAX_PLAYER_NAME ]; format( szString, sizeof( szString ), "SELECT `username` FROM `players` WHERE Leader = %d LIMIT 1;", FactionID );// Aici modifici tu cum ai in baza de date !! 729 Result = mysql_query( SQL, szString ); 730 cache_get_data( Get[ 0 ], Get[ 1 ], SQL ); if( !Get[ 0 ] ) szLeaderName = "NO-ONE"; 732 else cache_get_field_content( 0, "username", szLeaderName, SQL, sizeof( szLeaderName ) ); 733 cache_delete( Result ); return ( szLeaderName ); } stock GetFactionMembers( FactionID ) { new szString[ 128 ], Cache:Result, Get[ 2 ]; format( szString, sizeof( szString ), "SELECT `Member` FROM `players` WHERE `Member` = %d", FactionID );// Aici modifici tu cum ai in baza de date !! 741 Result = mysql_query( SQL, szString ); 742 cache_get_data( Get[ 0 ], Get[ 1 ], SQL ); 743 cache_delete( Result ); return Get[ 0 ]; } if (strcmp(cmd, "/leaderss", true) == 0) { new szString[ 1200 ]; format( szString, sizeof( szString ), "{FFFFFF}LSPD - Lider: %sn", GetFactionLeader(1)); format( szString, sizeof( szString ), "{FFFFFF}LSPD - Members: %sn", GetFactionMembers(1)); ShowPlayerDialog( playerid, 3434, DIALOG_STYLE_MSGBOX, "Lista Factiunilor %d", szString, "Ok", "" ); return 1; } Imagini / Video (optional): Ati incercat sa rezolvati singur?: da, dar nu ma pricep prea bine la mysql
  11. pai nu ma pricep cu mysql cu pawno stiu destul de bine zic eu, dar nu inteleg ce e cu alea de la mysql queri si toate alea.
  12. am o gramada de erori si pe langa asta comenzile mele sunt pe strcmd...
  13. Problema intalnita (descriere): Am un gm pe mysql si nu stiu cum sa fac o comanda sa afiseze liderii factiunilor(chiar daca sunt offline sau online) Ero(area / rile) / warning-(ul / urile): Liniile de cod / sursa / script-ul(obligatoriu): if(strcmp(cmd, "/offmakeleader", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] > 5) { new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /offmakeleader [NUMELE-EXACT]"); return 1; } new Query[256]; format(Query, sizeof(Query), "SELECT `username` FROM `players` WHERE username = '%s' AND Leader > 0 LIMIT 1", (result)); mysql_query(Query); mysql_store_result(); if(!mysql_num_rows()) { format(string, sizeof(string), "Nu este nimeni cu numele %s inregistrat/cu factiune!", (result)); mysql_free_result(); return SendClientMessage(playerid, 0xDC0C0CFF, string); } else if(mysql_num_rows() != 0) { format(Query, sizeof(Query), "UPDATE `players` SET `Leader` = 0 WHERE username = '%s'", (result)); mysql_query(Query); mysql_store_result(); format(string, sizeof(string), "{1580EA}[Info:] {FFFFFF}%s nu mai este lider!", (result)); ABroadCast(0xa9c4e4FF, string, 1); mysql_free_result(); } } } } Comanda de face un leader offline. Comanda care am incercat sa o fac si da eroare if (strcmp(cmd, "/leaders", true) == 0) { new Query[256]; format(Query, sizeof(Query), "SELECT * FROM `players` WHERE `Leader` = '%d'", PlayerInfo[playerid][pMember]); mysql_query(MySQLCon, Query, "", ""); new numrows = cache_get_rows(); new username[MAX_PLAYER_NAME], string[128]; if(numrows > 0) { for(new i; i < numrows; i++) { cache_get_field_content(i, "Username", username, 1, sizeof(username)); if(ReturnUser(username)) { format(string, sizeof(string), "%s[ONLINE]", username); return SendClientMessage(playerid, -1, string); } format(string, sizeof(string), "%s[OFFLINE]", username); SendClientMessage(playerid, -1, string); } } } Imagini / Video (optional): Ati incercat sa rezolvati singur?: am tot cautat pe net comenzi si am incercat sa le modific cu datele mele dar nu a mers.
  14. Mister

    Ajutor.

    uitate la public onplayercommandtext poate ai un for de 1000 ceva de genul asta
  15. Dar nu asta imi trebuie ca asa am si eu, cum fac la comanda sa mearga aia ca era bine doar ca trebuie sa mai pun ceva dar nu stiu ce. ca zice ca nu am definit argumentul bla bla . Ce trebuie sa pun intre paranteza dreapta? if(IsPlayerInArea(playerid,GangNumber)) PS: daca fac ca mai jos da asta warning 202: number of arguments does not match definition warning 202: number of arguments does not match definition warning 202: number of arguments does not match definition
  16. error 035: argument type mismatch (argument 2) if(IsPlayerInArea(playerid,GangNumber))
  17. EDIT: am facut asa new Float:GangNumber[1][4] = { {2335.575, -2685.911, 2522.421, -2405.642} }; iar comanda da eroare cum trebuie sa o modific if(strcmp(cmd, "/blabla", true) == 0) { if(IsPlayerInArea(playerid,GangNumber[0][4])) { SendClientMessage(playerid, COLOR_WHITE, "asdasgfw"); return 1; } }
  18. NoNamed Am facut asa new Float:GangNumber[4] = {2335.575, -2685.911, 2522.421, -2405.642}; si aici ce pun? da eroare la comanda : error 032: array index out of bounds (variable "GangNumber") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase if(strcmp(cmd, "/blabla", true) == 0) { if(IsPlayerInArea(playerid,GangNumber[4])) { SendClientMessage(playerid, COLOR_WHITE, "sdaqsdafefv"); return 1; } }
  19. Salut acum da asta (20894) : error 006: must be assigned to an array am pus asa new gangulnumarul0[123]; si zice. error 047: array sizes do not match, or destination array is too small Si mai departe ce ar trebui sa ii fac.
  20. Ok, deci unde scrie asta SetTimerEx("Fillup", RefuelWait, false, "i", playerid); RefuelWait este timpul in care se alimenteaza masina daca vrei sa dureze 10 secunde alimentarea inlocueste asa: SetTimerEx("Fillup", 10000, false, "i", playerid); PS: decat sa dureze 10 secunde mai bine faci sa dureze in functie de litrii pe care ii pui in rezervor, Exepmlu: adica daca bagi 10 litri sa dureze 4 secunde daca bagi 100l sa dureze 40 secunde Si scrii asa daca vrei: SetTimerEx("Fillup", 400*moneys, false, "i", playerid); Daca nu mai ai nevoie de ajutor si ai solutionat problema marcheaza ca rezolvat.
  21. Ba da se vede foarte clar zona nu are nicio problema dar vreau ca acele coordonatele sa le salvez intr-o variabila sa pot umbla mai usor cu ea. Ex daca am acele coordonate de teritorii in mai multe locuri daca vreau sa schimb coordonatele teritoriului sa il mut, trebuie schimbate in toate locurile din gm unde am coordonatele asa daca am acea variabila definita schimb doar acolo coordonata nu nai trebuie sa schimb peste tot in gm.
  22. :) da am inteles ca aceasta este comanda dar arata codul conenzii ca sa il pot edita :)
  23. Nu te supara dar ce ai vrut sa spui mai sus? Asta a fost penru +1 nu am inteles.
  24. Salut, posteaza comanda prin care alimentezi.
×
×
  • 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.