Jump to content

Tarzanus

Membru
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Tarzanus

  1. if(strcmp(cmd, "/cc", true) == 0 || strcmp(cmd, "/clearchat", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1) { for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerData[pAdmin] < 1) { for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); } } } } GameTextForAll("Chat cleared!", 1000,1); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "{43D1D1}AdmWarning:{FFFFFF} %s a sters chatul.", sendername); ABroadCast(COLOR_LIGHTRED,string,1); return 1; } else { SendError(playerid,cmd); return 1; } } else { SendClientMessage(playerid, COLOR_RED, "Logheaza-te mai intai!"); } return 1; }
  2. Tarzanus

    Errors

    [19:55:21] [WARNING] cache_insert_id - no active cache [19:55:21] [ERROR] mysql_format - destination size is too small [19:55:21] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''EAA6AF6BE82D056701F51837DF4DE6D90ED38A08AB3D87AB2AF93212128246FD74C5CDC5395B35D' at line 1 MySQL r38.
  3. SetPlayerCheckpoint (playerid, x, y, z, 3.5); E clar ca voi vreti doar mura-n gura, nu studiati functie pe google, sau ceva.
  4. SetPlayerCheckpoint (playerid, x, y, z, float:size): Float: size e marimea checkpointului
  5. Înlocuiește public timp () cu public timp(playerid) Di la adoua care este exact linia.
  6. Dute la comanda de setare a admin-ului si pune if(IsPlayerAdmin(playerid)) { Cred ca ai inteles ce vreau sa spun.
  7. Tarzanus

    Errors

    Nu cred ca ar avea vreun rost.. Adica e pe r39-2 ce ar trebui sa fie?
  8. Tarzanus

    Errors

    Sterge-ti please, lag la net.
  9. Tarzanus

    Errors

    Problema intalnita (descriere): Pai mysql_log spune tot Ero(area / rile) / warning-(ul / urile): [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') [22:39:16] [ERROR] cache_get_field_content_int - invalid datatype [22:39:29] [ERROR] mysql_format - no value for specifier "%s" available [22:39:29] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `ID` = ''' at line 1 Liniile de cod / sursa / script-ul: forward SavePlayerData(playerid); public SavePlayerData(playerid) { szQuery[0] = EOS, PaccInfo[playerid][LGIN] = 0; mysql_format(Handle, szQuery, 256, "UPDATE `users` SET `Money` = '%d', `Level` = '%d', `VIP` = '%d', `Kills` = '%d', `Deaths` = '%d', `Hours` = '%d', `Mins` = '%d', `Secs` = '%d' WHERE `Name` = '%e' WHERE `ID` = '%s'", PaccInfo[playerid][Money], PaccInfo[playerid][Level], PaccInfo[playerid][Vip], PaccInfo[playerid][Kills], PaccInfo[playerid][Deaths], PaccInfo[playerid][Hours], PaccInfo[playerid][Mins], PaccInfo[playerid][Secs], PaccInfo[playerid][ID]);//Scriem comanda pentru baza de date mysql_tquery(Handle, szQuery, "", "", playerid); return 1; } forward LoadPlayerData(playerid); public LoadPlayerData(playerid) { szQuery[0] = EOS; /*if(!cache_get_row_count(Handle)) { format(szQuery, 128, "{00FF00}Salut {FF0000}%s{00FF00}nAcest nume este inregistrat.n{FFFF00}Te rugam sa introduci parola.", GetName(playerid)); ShowPlayerDialog(playerid, L_DIALOG, DIALOG_STYLE_PASSWORD, "Logare", szQuery, "Logare", "Exit"); return 1; }*/ PaccInfo[playerid][ID] = cache_get_field_content_int(0, "ID", Handle); cache_get_field_content(0, "IP", PaccInfo[playerid][IP], Handle, 20); cache_get_field_content(0, "Name", PaccInfo[playerid][Name], Handle, 20); cache_get_field_content(0, "Password", PaccInfo[playerid][Password], Handle, 20); PaccInfo[playerid][Money] = cache_get_field_content_int(0, "Money", Handle); PaccInfo[playerid][Level] = cache_get_field_content_int(0, "Level", Handle); PaccInfo[playerid][Vip] = cache_get_field_content_int(0, "VIP", Handle); PaccInfo[playerid][Kills] = cache_get_field_content_int(0, "Kills", Handle); PaccInfo[playerid][Deaths] = cache_get_field_content_int(0, "Deaths", Handle); PaccInfo[playerid][Hours] = cache_get_field_content_int(0, "Hours", Handle); PaccInfo[playerid][Mins] = cache_get_field_content_int(0, "Mins", Handle); PaccInfo[playerid][Secs] = cache_get_field_content_int(0, "Secs", Handle); PaccInfo[playerid][LGIN] = 1; format(szQuery, 128, "Bine ai revenit %s. Ai fost logat cu succes.", GetName(playerid)); SendClientMessage(playerid, LIGHTGREEN, szQuery); return 1; } if(dialogid == R_DIALOG) { if(!response) return Kick(playerid); szQuery[0] = EOS; if(strlen(inputtext) < 3) { format(szQuery, 128, "Salut %s, acest nume nu este inregistrat.nTe rugam sa introduci parola.nParola trebuie sa contina minim 3 caractere.", GetName(playerid)); ShowPlayerDialog(playerid, R_DIALOG, DIALOG_STYLE_PASSWORD, "Inregistrare", szQuery, "Inregistrare", "Exit"); return 1; } new PasswordHash[129]; WP_Hash(PasswordHash, 129, inputtext); PaccInfo[playerid][ID] = cache_insert_id(Handle); mysql_format(Handle, szQuery, 256, "INSERT INTO `users` (`Name`, `Password`, `IP`, `Money`, `Level`, `VIP`, `Kills`, `Deaths`, `Hours`, `Mins`, `Secs`) VALUES ('%s', '%e', '%e', 0, 0, 0, 0, 0, 0, 0, 0)", GetName(playerid), PasswordHash, GetIP(playerid)); mysql_tquery(Handle, szQuery, "", ""); SendClientMessage(playerid, LIGHTBLUE, "Te-ai inregistrat cu succes, ai fost logat automat."); PaccInfo[playerid][LGIN] = 1; return 1; } if(dialogid == L_DIALOG) { if(!response) return Kick(playerid); new PasswordHash[129]; WP_Hash(PasswordHash, sizeof(PasswordHash), inputtext); mysql_format(Handle, szQuery, 256, "SELECT * FROM `users` WHERE `Name` = '%e' AND `Password` = '%e' LIMIT 1;", GetName(playerid), PasswordHash); mysql_tquery(Handle, szQuery, "LoadPlayerData", "d", playerid); return 1; } Imagini / Video (optional): - Ati incercat sa rezolvati singur?: Da, si mi-am frecat nervii vreo 5 ore.
  10. Salut sunt Tarzanus si am sa va prezint tutorialul in care puteti face caracterul sa se spawneze la spital dupa ce moare. In primul rand: #include <a_samp> In header, adica in Nordul script-ului. Adaugam sub include: new isDead[MAX_PLAYERS]; - -Cu aceasta variabila aratam daca a murit sau nu. La OnPlayerDeath adaugam: isDead[playerid] = 1; -- Asta indica moartea skin-ului. La onPlayerSpawn adaugam: if(isDead[playerid] == 1) { SetPlayerPos(playerid, 1604.6643,1815.2538,10.8203); isDead[playerid] = 0; } Aceasta functie face, sa-i reseteze isDead, si sa-l duca la spital.
  11. Sincer, fix dupa cel al lui DuReX l-ai facut.. Si acum sa nu sariti cu gura, pentru ca stiu ce vorbesc. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 4590) { if(response) { switch(listitem) { case 0: return cmd_sm(playerid); case 1: return cmd_cl(playerid); case 2: return cmd_ft(playerid); case 3: return cmd_of(playerid); case 4: return cmd_bp(playerid); case 5: return cmd_jo(playerid); case 6: return cmd_co(playerid); case 7: return cmd_tn(playerid); case 8: return cmd_hn(playerid); case 9: return cmd_pt(playerid); case 10: return cmd_li(playerid); } } return 1; } if(dialogid == 4591) { if(response) { new string1[128]; PlayAudioStreamForPlayer(playerid, string1); } return 1; } return 0; } Seamana perfect cu asta public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_RADIO) { if(response) { switch(listitem) { case 0: return cmd_radiowish(playerid); case 1:return cmd_radiohit(playerid); case 2: return cmd_contactfm(playerid); case 3: return cmd_romanianhiphop(playerid); case 4: return cmd_romanianmanele(playerid); case 5: return cmd_romanianpopular(playerid); case 6: return cmd_profm(playerid); case 7: return cmd_gmusic(playerid); case 8: return cmd_radiotube(playerid); case 9: return cmd_radiomafia(playerid); case 10: return cmd_greudedifuzat(playerid); case 11: return cmd_stopradio(playerid); } } return 1; } return 0; }
  12. Tarzanus

    Ajutor

    Dupa variabile mi-am dat seama ca folosesti RSE V4. stock SendConnect(playerid) { new string [228]; //-------------------------------------------------------------------------- format(string, 228, "{0066CC}%s{FFFF00}[{FFFFFF}id:%d{FFFF00}]{FFFFFF} s-a conectat{FF0000}[Level: {0066CC}%d{FF0000}].", PlayerName2(playerid), playerid, AccInfo[playerid][Level]); SendClientMessageToAll(COLOR_RED, string); return 1; } Codul asta daca vrei sa-ti mearga trebuie pus in filterscripts, pentru ca acolo este variabila de admin.
×
×
  • 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.