Jump to content

Stark.sys

Membru
  • Posts

    113
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Stark.sys

  1. announce 1 vezi da ai asa in server.cfg ;)
  2. Incearca si asa: new gInfernusStock[MAX_PLAYERS] = 10; iar cand vrei sa scada poti folosi asa: gInfernusStock[playerid] --; Iar ca mesaj de alerta ! if(gInfernusStock[playerid] < 0) return SendClientMessage(playerid, -1, "Nu mai sunt masini in stock !");
  3. Ce tip de program (Dini, YSI, MySQL) folosesti ?
  4. Foarte util, e foarte bun pentru incepatori si pentru cei care vor sa invete !
  5. Nici eu nu stiu cum se foloseste bin-ul pe taste, euu doar ti-am dat un exemplu care la-am gasit pe wiki ... documenteazate si tu pe wki poate intelegi ceva !
  6. Executa server, si uitate in log ;)
  7. ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7, (C)2005-2015 SA-MP Team [08:53:15] filterscripts = "" (string) [08:53:15] [08:53:15] Server Plugins [08:53:15] -------------- [08:53:15] Loading plugin: mysql [08:53:15] >> plugin.mysql: R38 successfully loaded. [08:53:15] Loaded. [08:53:15] Loaded 1 plugins. [08:53:15] [08:53:15] Filterscripts [08:53:15] --------------- [08:53:15] Loaded 0 filterscripts. [08:53:16] Conexiunea la baza de date bazadate a esuat ---> Server Inchis ~~~ [08:53:16] !!!GM LOADED!!! [08:53:16] Number of vehicle models: 0 [08:53:16] --- Server Shutting Down. [08:53:19] plugin.mysql: Unloading plugin... [08:53:19] plugin.mysql: Plugin unloaded.
  8. Uite poate te ajuta acest link ! http://wiki.sa-mp.com/wiki/OnPlayerKeyStateChange Cred ca ar veni asa: // PRESSED(keys) #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_SECONDARY_ATTACK)) // Apesi tasta Enter { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(HouseInfo); i++) { if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]) && InHouse[playerid] == i) { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]); PlayerData[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); PlayerData[playerid][pLocal] = 255; InHouse[playerid] = 0; if(HouseInfo[i][hHel] == 1) { new Float:tempheal; GetPlayerHealth(playerid,tempheal); if(tempheal < 100.0) { SetPlayerHealth(playerid,100.0); } } } } } } return 1; }
  9. Frumos si simplu, insa e R38 la mysql.
  10. Stark.sys

    Case LV

    Frumos Mapping :), imi place stilul tau
  11. Puteti inchide topicul, nu ma mai ocum de acel GM.. e prea complicat un gm de la 0... pt incepatori
  12. Problema intalnita (descriere): Cum pot face sa se insereze prin sql query, valori enum ?! Ero(area / rile) / warning-(ul / urile): #1136 - Column count doesn't match value count at row 1 Liniile de cod / sursa / script-ul(obligatoriu): INSERT INTO `factiuni`(`ID`, `Name`, `Leader`, `Members`, `Rank`, `Skin`, `Turfs`, `Deposit`) VALUES (1,'Los Santos Police Departament','N\A',0,'N\A','',0), ('0', 'Money'), ('0', 'Drugs'), ('0', 'Materials'); INSERT INTO `factiuni`(`ID`, `Name`, `Leader`, `Members`, `Rank`, `Skin`, `Turfs`, `Deposit`) VALUES (2,'Las Venturas Police Departament','N\A',0,'N\A','',0), ('0', 'Money'), ('0', 'Drugs'), ('0', 'Materials'); INSERT INTO `factiuni`(`ID`, `Name`, `Leader`, `Members`, `Rank`, `Skin`, `Turfs`, `Deposit`) VALUES (3,'San Fierro Police Departament','N\A',0,'N\A','',0), ('0', 'Money'), ('0', 'Drugs'), ('0', 'Materials'); Imagini / Video (optional): -- (N\A) Ati incercat sa rezolvati singur?: Da, dar nu reusesc ...
  13. Ce versiune mysql folosesti ?! if(strcmp(cmd, "/banip", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 3) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /banip [playerid/ip jucator] [days - 0 for permanent] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); 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} /banip [playerid/ip jucator] [days - 0 for permanent] [reason]"); return 1; } if(PlayerInfo[giveplayerid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_WHITE, "{0066FF}AdmCmd: {FFFFFF}Nu poti bana admini!"); format(string, sizeof(string), "{0066FF}AdmCmd: {FF0000}%s {FFFFFF}a incercat sa il baneze pe {FF0000}%s {FFFFFF}cu motivul: %s", sendername, giveplayer, (result)); ABroadCast(COLOR_LIGHTRED, string, 1); return 1; } if(PlayerInfo[giveplayerid][pAdmin] > 6) { SendClientMessage(playerid, COLOR_WHITE, "{0066FF}AdmCmd: {FFFFFF}Nu poti bana Fondatorii!"); format(string, sizeof(string), "{0066FF}AdmCmd: {FF0000}%s {FFFFFF}a incercat sa il baneze pe {FF0000}%s {FFFFFF}cu motivul: %s", sendername, giveplayer, (result)); ABroadCast(COLOR_LIGHTRED, string, 1); return 1; } if(strmatch(giveplayer, "Jimmi")) return SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Ban: {FFFFFF}Fraiere, e server-ul meu."); new year, month,day; getdate(year, month, day); new hour, minute, second; gettime(hour, minute, second); format(string, sizeof(string), "Info: %s a primit ban de la %s, motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); BanLog(string); format(string, sizeof(string), "{0066FF}Info: %s a primit ban de la %s, motiv: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); PlayerInfo[giveplayerid][pReg] = -999; Update(giveplayerid, pRegisteredx); new playersip[256]; GetPlayerIp(giveplayerid,playersip,sizeof(playersip)); strmid(PlayerInfo[giveplayerid][pIP], playersip, 0, 100, 255); Update(giveplayerid, pIPx); new query[512]; format(query, sizeof(query) ,"INSERT INTO `banslog` (`BanID`,`user_banned`,`user_banned_ip`,`user_banner`,`ban_reason`,`ban_timestamp`,`ban_time`) VALUES ('','%s','%s','%s','%s',CURRENT_TIMESTAMP,'%d')", giveplayer, PlayerInfo[giveplayerid][pIP], sendername, result, 0); mysql_query(query); SendClientMessage(giveplayerid, COLOR_WHITE, "|__________________[BAN]__________________|"); format(string, sizeof(string), "Adminul care te-a banat : {FFFF00}%s",sendername); SendClientMessage(giveplayerid, COLOR_GREY, string); format(string, sizeof(string), "Motivul : {FFFF00}%s",(result)); SendClientMessage(giveplayerid, COLOR_GREY, string); format(string, sizeof(string), "Ban : {FFFF00}Permanent"); SendClientMessage(giveplayerid, COLOR_GREY, string); format(string, sizeof(string), "Data curenta : {FFFF00}%d-%d-%d",month,day,year); SendClientMessage(giveplayerid, COLOR_GREY, string); format(string, sizeof(string), "Data expirarii : {FFFF00}%d-%d-%d",month,day,year,hour, minute, second); SendClientMessage(giveplayerid, COLOR_GREY, string); format(string, sizeof(string), "Pentru unban intrati pe forumul nostru: WWW.PG-ZONE.RO"); SendClientMessage(giveplayerid, COLOR_GREY, string); SendClientMessage(giveplayerid, COLOR_WHITE, "|__________________________________________|"); kicktimer[giveplayerid] = SetTimerEx( "KickS",100, true, "d", giveplayerid ); return 1; } } } } return 1; }incearca asa, dar nu cred ca va functiona . !!
  14. CMD:setlevel(playerid, params[]) { if(PD[playerid][pAdmin] == 3) new tID, nLvl, rs[32], type[128]; if(sscanf(params, "uis[32]", tID, nLvl, rs)) return SendClientMessage(playerid, -1, "Use: /setlevel <PlayerID/PartOfName> <New Level> <Reason>"); if(!IsPlayerConnected(tID) || tID != INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ERROR: Playerul nu este conectat sau nu exista !"); SetPlayerScore(tID, nLvl); type = "Change Player Level"; new z, l, a, o, m, s, cnt[256]; getdate(a,l,z), gettime(o, m, s); format(date, sizeof(date), "%02d/%02d/%02d - %02d:%02d:%02d", z, l, a, o, m, s); format(cnt, sizeof(cnt), "Log: Adminul %s ia schimbat level lui %s in %d. Motiv: %s", GetN(playerid), GetN(tID), nLvl, rs); SaveLogs(type, cnt, date); } else SCM(playerid, 0xB7CAE9FF, "SERVER: {FFFFFF} Nu esti admin level 3 !"); return 1; } Setlevel + log. CMD:setvip(playerid, params[]) { if(PD[playerid][pAdmin] >= 2) { new tID, nLvl, rs[32], type[128]; if(sscanf(params, "uis[32]", tID, nLvl, rs)) return SendClientMessage(playerid, -1, "Use: /setlevel <PlayerID/PartOfName> <Vip Level> <Reason> (1 - 3)"); if(nLvl < 1 && nLvl > 3) return SendClientMessage(playerid, -1, "ERROR: Vip level avaible ( 1 -3 )"); if(!IsPlayerConnected(tID) || tID != INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ERROR: Playerul nu este conectat sau nu exista !"); PD[tID][pVip] = nLvl; type = "Set Premium Account"; new z, l, a, o, m, s, cnt[256]; getdate(a,l,z), gettime(o, m, s); format(date, sizeof(date), "%02d/%02d/%02d - %02d:%02d:%02d", z, l, a, o, m, s); format(cnt, sizeof(cnt), "Log: Adminul %s ia oferit lui %s vip level %d. Motiv: %s", GetN(playerid), GetN(tID), nLvl, rs); SaveLogs(type, cnt, date); } else SCM(playerid, 0xB7CAE9FF, "SERVER: {FFFFFF} Nu esti admin level 2+ !"); return 1; } SetVip + log.
  15. Deci vrei un sistem de helper ? Daca da ce sistem de comenzi folosesti ? (ZMCD, DCMD, Default) - ZeeX, Draco Blue, SA:MP Team
  16. Utilizezi zcmd, dcmd sau default command ?
  17. http://forum.sa-mp.ro/index.php/topic/17547-model-pentru-cererea-de-ajutor/ Ce ar fi sa citesti inainte sa postezi ?
  18. ce erori ? arata o imagine
  19. #define d_leaders (1054) si la ShowPlayerDialog(i, leaders, DIALOG_STYLE_MSGBOX, "Lideri Online", str, "Close", ""); schimba cu: ShowPlayerDialog(i, d_leaders, DIALOG_STYLE_MSGBOX, "Lideri Online", str, "Close", "");
  20. Revin cu edit in 30 min. Edit: defineste asta #define leaders (1054) iar comanda: http://pastebin.com/GjtF4SDG
  21. Pentru putin, ma bucur ca ti-am fost de ajutor.
  22. zice ca new bike; nu este utilizat. de asta cauta new bike si pune in fata //
  23. Pune in GM asa: new Filter[MAX_PLAYERS];
  24. if(!strcmp(cmdtext, "/leaders", true, 8) || !strcmp(cmdtext, "/lideri", true, 7)) { for(new i = 0; i < MAX_PLAYERS; i++) { new count = 0, LName[MAX_PLAYER_NAME]; GetPlayerName(i, LName, sizeof(LName)); if(IsPlayerConnected(i)) { if(PlayerInfo[pLeader] == 1) { format(string, sizeof(string), "{0000FF}Police Department: %s (Level: %d | ID: %d)", LName, PlayerInfo[pLevel], i); count++; } if(PlayerInfo[pLeader] == 2) { format(string, sizeof(string), "{0000FF}F.B.I.: %s (Level: %d | ID: %d)", LName, PlayerInfo[pLevel], i); count++; } ShowPlayerDialog(i, 11, DIALOG_STYLE_MSGBOX, "Lideri Online", string, "Ok", ""); } } return 1; } vezi asa daca merge !
×
×
  • 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.