-
Posts
1.557 -
Joined
-
Last visited
-
Days Won
28
Content Type
Profiles
Forums
News
Documentation
Everything posted by Джо
-
La OnPlayerUpdate ai ceva?Ai gmul pe mysql?
-
Nu ai aranjat bine liniile 31 44 55 66 76 86 97 108 118
-
Asta fiindca atat suporta dialogul(maxim 20 de randuri) din cate stiu eu.Incearca sa faci un filescript cu sistemul si va fi mai eficient asa,nici nu consumi mult din gamemode...
-
Nu e asta. Pune playerul pe spec folosind functia http://wiki.sa-mp.com/wiki/TogglePlayerSpectating
-
Hmm,te cunosc de undeva nu stiu de unde exact,esti cumva si scripter rus/cunosti limba rusa? Apropo,idee frumoasa buna succes :* Am observat si alte lucrari d'ale tale(mape parca) si erau faine,bravo.
-
Atunci fa in felul urmator ca sa fie bine:)) Romani inventivi: Dute la comanda /god si vezi ca scrie acolo X este on duty ca ... Acolo mai jos ai ceva de genul SendAdminMessage,sau AbCoastMessage sau ceva gen acesta...Si copiaza acel mesaj exemplu SendAdminMessage si dute pana dai de un public in care o sa iti arate ceva de genul: PlayerData[p..] >= 1; Tu copiezi acel p..(unde p.. semnifica variabila adminilor) si o pui aici: 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, PlayerData[playerid][p..]);//In loc de p...Inlocuiesti cu variabila ce ai gasito.. SendClientMessageToAll(COLOR_RED, string); return 1; }
-
Topic Closed. Respecta modelul.
-
Ia,incearca asa: Sterge [MAX_PLAYERS] si lasa ; vezi ce se intampla..
-
Aratane liniile 18130 18131 18132 te rog.
-
Salut,foloseste nativechecker de aici:
-
Salut,acest plugin nu este facut de mine,dar l-am postat aici fiindca multi consider ca o sa aiba nevoie de el si nu stiu de unde sa il ia.Pai asa am facut o scurtatura si l-am postat aici. La ce ajuta acest plugin? Acest plugin va ajuta sa aflati cauza erorii ''Run time error 19: "File or function is not found' sau a altor erori gasite in consola. Erori care cauzeaza aceasta eroare de ''File or function is not found": Deseori este intalnita fiindca trebuie sa updatati pluginurile streamer sscanf sau alte pluginuri ce le folositi la server. O alta eroare ar fi aceea de a folosi scriptul cand este trecut pe o versiune noua. Exemplu: Tu ai compilat modul cu pawno 0.3z si pornesti serverul cu versiunea samp 0.3.7. Cum se instaleaza? Pui dll-ul in folderul plugins si il adaugi in server.cfg la linia plugins... Download: Server Windows: http://www.solidfiles.com/d/5c0a/nativechecker.dll Linux: http://www.solidfiles.com/d/0c45/nativechecker.so Post original: http://forum.sa-mp.com/showthread.php?t=249226 Atentie!Ca sa functioneze corect pluginul nativechecker trebuie sa fie pus ultimul la linia plugins din server.cfg.Exemplu: plugins streamer sscanf nativechecker
-
Ok ca sa intelegi mai bine invata sa folosesti urmatoarele functii si callbacks: http://wiki.sa-mp.com/wiki/ShowPlayerDialog http://wiki.sa-mp.com/wiki/OnDialogResponse Aici iti da exemplu concret cum trebuie sa faci. Exemplu: if(dialogid == DIALOG_HELPME) { if(response) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", ""); } case 1: { ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", ""); } case 2: { ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", ""); } } } else { SendClientMessage(playerid, COLOR_RED, "Ai anulat") } } Daca ai mai multe cazuri doar copii: case 2: { ShowPlayerDialog(playerid, DIALOG_BUYCAR1, DIALOG_STYLE_MSGBOX, "Titlu", "Scrie ce vrei.", "Ok", ""); } Si ii schimbi numarul din case 2 in case 3.
-
Ok,o alta intrebare,cand se conecteaza iti zice levelul tau din joc? 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][pAdmin]); SendClientMessageToAll(COLOR_RED, string); return 1; } In loc de pAdmin inlocuieste cu ce variabila ai tu la admini... spre exemplu pAdministrator sau Admin sau Administrator,vezi la enum pInfo sau la enum pData ca ai acolo ceva cu Admin sau pAdmin..
-
Este din cauza string-ului ridicat la public showStats.Micsoreazal si vezi ce se intampla. Apropo ai /stats pe dialog sau scris normal?
-
Problema legata de Scripting. Fa un topic aici. http://www.sa-mp.ro/forums/forum/355-ajutor-scripting/
-
Ai de capu meu aveam castile in urechi cand am dat drumul la video=))Si au bubuit numai dintr-o data. Frumos:)) O sa intru cand am timp.
-
Topic Cloed! Avem un model de respectat.
-
Salut,in acest post o sa iti arat cum pui restrictie pe o comanda...(healall ban etc..) Este simplu pai,in primul rand ai restrictia IsPlayerConnected care verifica daca playerul este conectat avem o { (acoalada mai jos) apasam enter si punem: if(PlayerInfo[playerid][pAdmin] >= 4) { //Restul de conditii.. Unde: PlayerInfo - Aici la unele sunt PlayerInfo(de obicei pe INI,dar si pe MySQL am intalnit.Poate fi inloccuit cu PlayerData. playerid - O alta variabila pentru functia PlayerInfo(un singur player). pAdmin - Verifica daca playerul care a tastat comanda este administrator. >= - Aici daca gradul este mai mare sau egal cu 4.(gradul administratorului). 4 - Gradul adminului care poate folosi comanda este 4. Exmplu comanda /healall: if(strcmp(cmd, "/healall", true) == 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 4) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i)) { SetPlayerHealth(i, 99); format(string, sizeof(string), "Administratorul %s a dat tuturor playerilor full health.", sendername); SendClientMessageToAll(COLOR_LIGHTRED, string); } } } else { SendClientMessage(playerid, COLOR_RED, ": Nu ai acces la aceasta comanda!"); } } else { SendClientMessage(playerid, COLOR_RED, ": Trebuie sa fii logat ca sa poti folosi aceasta comanda!"); } return 1; }
-
CMD:factionhelp(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] != 0) { if(PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /mdc /su /arrest /sellaccept /acceptpoints"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /opencell /opengate /m(egaphone) /tazer /cuff /untie"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /uncuff /frisk /clear /d(epartments) /r(adio) /wanted"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /ticket /duty /backup /ram /confiscate /takedrugs /startradar /stopradar"); } else if(PlayerInfo[playerid][pMember] == 2) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /mdc /su /arrest /sellaccept /acceptpoints"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /opencell /opengate /m(egaphone) /tazer /cuff /untie"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /uncuff /frisk /clear /d(epartments) /r(adio) /wanted"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /ticket /duty /backup /ram /confiscate /takedrugs"); } else if(PlayerInfo[playerid][pMember] == 3) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /mdc /su /arrest /sellaccept /acceptpoints"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /opencell /opengate /m(egaphone) /tazer /cuff /untie"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /uncuff /frisk /clear /d(epartments) /r(adio) /wanted"); SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /ticket /duty /backup /ram /confiscate /takedrugs /undercover"); } else if(PlayerInfo[playerid][pMember] == 4) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /cabinet /attack /wartime /turftimer /f /fdrugs /fmats /fdeposit /tie /untie /geat"); } else if(PlayerInfo[playerid][pJob] == 5) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /cabinet /attack /wartime /turftimer /f /fdrugs /fmats /fdeposit /tie /untie /geat"); } else if(PlayerInfo[playerid][pMember] == 6) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /order /attack /wartime /turftimer /f /fdrugs /fmats /fdeposit /tie /untie /geat"); } else if(PlayerInfo[playerid][pMember] == 7) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /checkcharity"); } else if(PlayerInfo[playerid][pMember] == 8) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /tow /towpoints"); } else if(PlayerInfo[playerid][pMember] == 9) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /news /live /deliver /read /papers /paper"); } else if(PlayerInfo[playerid][pMember] == 10) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /order /attack /wartime /turftimer /f /fdrugs /fmats /fdeposit /tie /untie /geat"); } else if(PlayerInfo[playerid][pMember] == 11) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /portable"); } else if(PlayerInfo[playerid][pMember] == 12) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /givelicense /startlesson /stoplesson /acceptlic /closelic /clicense /license"); } else if(PlayerInfo[playerid][pMember] == 13) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /accept taxi /fare"); } else if(PlayerInfo[playerid][pMember] == 14) { SendClientMessage(playerid,COLOR_WHITE,"{3385FF}Faction: /healto /jobduty /d /r"); } } else { SendClientMessage(playerid,COLOR_WHITE,"{FFB870}You are not a member."); return 1; } } return 1; } Era pusa paranteza sus,in fine,incearca acum.
-
LimitPlayerMarkerRadius(5.0); Maresti in loc de 5.0 pui si tu alte cifre(ex 20.0 10.0 etc..) De aici se va vedea de la ce distanta ii vizualizezi pe minimap.
-
Ai adaugat-o sau era in GM? Daca era in gm uitate ce ai modificat ultima data(ce ai adaugat) si vezi ca de acolo este problema.
-
Topic Closed. Motiv:Ai mai facut un topic.
-
Bai,nu stiu de la cine ai copiat,dar iti sugerez treaba urmatoare: Daca vrei sa scapi 100% de flood pe sa-mp ti-as sugera sa pui minconnectiontime 1000 in server.cfg. Aceasta treaba verifica si lasa serverul ca un player sa se conecteze 1/s.Voi daca aveti flood puteti pune si un numar cat mai mic,spre exemplu 200 300 500 etc..
-
#include <a_samp> #include <sscanf2> #include <dini> #include <zcmd> #include <dfile> #define MAX_GPS_LOCATIONS 100 #define MAX_GPS_NAME_STRING 100 #define GPS_DIALOG 5900 #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_LIME 0x10F441AA #define COLOR_MAGENTA 0xFF00FFFF #define COLOR_NAVY 0x000080AA #define COLOR_AQUA 0xF0F8FFAA #define COLOR_CRIMSON 0xDC143CAA #define COLOR_FLBLUE 0x6495EDAA #define COLOR_BISQUE 0xFFE4C4AA #define COLOR_BLACK 0x000000AA #define COLOR_CHARTREUSE 0x7FFF00AA #define COLOR_BROWN 0XA52A2AAA #define COLOR_CORAL 0xFF7F50AA #define COLOR_GOLD 0xB8860BAA #define COLOR_GREENYELLOW 0xADFF2FAA #define COLOR_INDIGO 0x4B00B0AA #define COLOR_IVORY 0xFFFF82AA #define COLOR_LAWNGREEN 0x7CFC00AA #define COLOR_SEAGREEN 0x20B2AAAA #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime #define COLOR_MIDNIGHTBLUE 0X191970AA #define COLOR_MAROON 0x800000AA #define COLOR_OLIVE 0x808000AA #define COLOR_ORANGERED 0xFF4500AA #define COLOR_PINK 0xFFC0CBAA // - Light pink #define COLOR_SPRINGGREEN 0x00FF7FAA #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green #define COLOR_MEDIUMAQUA 0x83BFBFAA #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^ #define COLOR_GREY 0xAFAFAFAA new gpspos[MAX_PLAYERS][MAX_GPS_LOCATIONS][MAX_GPS_NAME_STRING]; new indexgps[MAX_PLAYERS]; public OnFilterScriptInit() { print("n--------------------------------------"); print(" This Gps is created by Kiburici!"); print("--------------------------------------n"); return 1; } public OnFilterScriptExit() { for(new i=0; i<=MAX_PLAYERS; i++) { indexgps = -1; for(new j=0; j<=MAX_GPS_LOCATIONS; j++) { for(new k=0; k<=MAX_GPS_NAME_STRING; k++) gpspos[j][k] = -1; } } return 1; } public OnPlayerConnect(playerid) { new pname[50],folder[100]; GetPlayerName(playerid,pname,sizeof(pname)); format(folder,sizeof(folder),"/gps/%s",pname); return 1; } public OnPlayerDisconnect(playerid, reason) { indexgps[playerid] = -1; for(new i=0; i<=MAX_GPS_LOCATIONS; i++) { for(new j=0; j<=MAX_GPS_NAME_STRING; j++) gpspos[playerid][j] = -1; } return 1; } CMD:newgpspos(playerid,params[]) { new placename[50],pname[50],file[100],Float:x,Float:y,Float:z; indexgps[playerid] = GetPlayerGPSFileCount(playerid); if(sscanf(params,"us", placename)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /newgpspos [id] [reason]"); GetPlayerName(playerid,pname,sizeof(pname)); GetPlayerPos(playerid,x,y,z); format(file,sizeof(file),"/gps/%s/%d.gps",pname,indexgps[playerid]); dini_Create(file); dini_Set(file,"Name",placename); dini_FloatSet(file,"PosX",x); dini_FloatSet(file,"PosY",y); dini_FloatSet(file,"PosZ",z); SendClientMessage(playerid,COLOR_GREEN,"Place added to your GPS. Use /gps to see."); return 1; } CMD:gps(playerid,params[]) { new pname[50],mstring[2000],str1[256],str2[260],file[100]; GetPlayerName(playerid,pname,sizeof(pname)); for(new i=0; i<=MAX_GPS_LOCATIONS; i++) { format(file,sizeof(file),"/gps/%s/%d.gps",pname,i); if(dini_Exists(file)) { str1 = dini_Get(file,"Name"); format(str2,sizeof(str2),"%sn",str1); strcat(mstring,str2); } } ShowPlayerDialog(playerid,GPS_DIALOG,DIALOG_STYLE_LIST,"GPS Locations",mstring,"OK","Cancel"); return 1; } public OnPlayerEnterCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == GPS_DIALOG) { if(response == 1) { new pname[50],file[200],Float:px,Float:py,Float:pz,send[100]; GetPlayerName(playerid,pname,sizeof(pname)); format(file,sizeof(file),"/gps/%s/%d.gps",pname,listitem); px = dini_Float(file,"PosX"); py = dini_Float(file,"PosY"); pz = dini_Float(file,"PosZ"); SetPlayerCheckpoint(playerid,px,py,pz,3.0); format(send,sizeof(send),"Checkpoint made at %.2f %.2f %.2f",px,py,pz); SendClientMessage(playerid,COLOR_GREEN,send); return 1; } else { SendClientMessage(playerid,COLOR_RED,"You cancelled!"); return 1; } } return 0; } stock GetPlayerGPSFileCount(playerid) { new file[100],pname[50]; GetPlayerName(playerid,pname,sizeof(pname)); for(new i=0; i<=MAX_GPS_LOCATIONS; i++) { format(file,sizeof(file),"/gps/%s/%d.gps",pname,i); if(!dini_Exists(file)) { return i; } } return 1; }
-
Dane mai multe detalii,cand mergi ca si walk style?Dupa ce te inregistrezi si faci tutorialul?(ce gm ai?)
