-
Posts
40 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by FlOrINn
-
-
am incercat si asa tot face.
-
Wtf nu are treaba, comanda trebuie sa transforme payday-uri in respect point ;|
Daca am 10 payday
Sa imi dea 10 Rp(pExp)
Am transformat functia care iti dadea la ore fixe rp in payday-uri si eu trebuie sa ma duc la locatia aia ca sa ridic payday-uri.
-
Problema intalnita (descriere):Am facut comanda, intru pe server si tasstez /ridicapayday imi da mai multe RP de cat trebuia , daca am 10 payday-uri de luat 10 RP sa imi dea :| RP = respect point
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):if(strcmp(cmd,"/ridicapayday",true)==0){if(IsPlayerConnected(playerid)){if(PlayerToPoint(3.0,playerid,1488.5713,-1771.1624,18.7958)){if (PlayerInfo[playerid][pIapayday] >= 1){new coordsstring[256];new string2[1000];new Iapayday = PlayerInfo[playerid][pIapayday];format(string2, sizeof(string2), "{7CA600}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -n");format(coordsstring, sizeof(coordsstring), "{B2248F}Ai ridicat %d PayDay-uri si primesti :n", Iapayday);strcat(string2,coordsstring);new exp = PlayerInfo[playerid][pExp];PlayerInfo[playerid][pExp] = pIapayday;format(coordsstring, sizeof(coordsstring), "{00FFCC}|-| %d Respect Points !n", exp);strcat(string2,coordsstring);PlayerInfo[playerid][pIapayday] -= Iapaydayformat(coordsstring, sizeof(coordsstring), "{7CA600}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");strcat(string2,coordsstring);ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"PayDay",string2,"Close","");}else{new coordsstring[256];new string2[1000];format(string2, sizeof(string2), "{7CA600}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -n");format(coordsstring, sizeof(coordsstring), "{B2248F}Nu aveti nici un PayDay de ridicat !n");strcat(string2,coordsstring);format(coordsstring, sizeof(coordsstring), "{7CA600}- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");strcat(string2,coordsstring);ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"PayDay",string2,"Close","");}}}}//------------
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da -
Am rezolvat-o pana la urma :| ciudat este ca aveam defenit dialogul ala cu alt id :Z l-am facut din nou si a functionat !
Multumesc pentru ajutor !
-
Uitate in VipUsers/%s.ini scrie ca esti VIP?
Daca da, nu ai facut cand te loghezi sa citeasca fila aia .
-
Джо nu sunt chiar asa cum ma consideri, am incercat aia inainte in helpme si nu a functionat ,am cautat dialogul care imi aparea si l-am sters nici nu avea id dialogul ala si daia.
-
Am rezolvat aia acum :
Se da :
case 0: { ShowPlayerDialog(playerid, dialog_general, DIALOG_STYLE_LIST,"Ajutor General", "Despre ContnInformatiinDespre ServernGeneralsnChatnBanknFactionnJob","Ok","Cancel"); return 1; } //Si dialog_general : if(dialogid == dialog_general) { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "Server:Ai oprit aceasta actiune!"); return 1; } switch(listitem) { case 0: { SendClientMessage(playerid, 0xFF0000FF, "TEST"); } case 1: { SendClientMessage(playerid, 0xFF0000FF, "TEST1"); } case 2: { SendClientMessage(playerid, 0xFF0000FF, "TEST2"); } case 3: { SendClientMessage(playerid, 0xFF0000FF, "TEST3"); } case 4: { SendClientMessage(playerid, 0xFF0000FF, "TEST4"); } case 5: { SendClientMessage(playerid, 0xFF0000FF, "TEST5"); } case 6: { SendClientMessage(playerid, 0xFF0000FF, "TEST6"); } } }
-
Tot cand dau pe case0 imi deschide alt dialog
-
Am rezolvat in mare parte, R3mus codul ala nu merge a trebuit sa-l rescriu ...
Acum e ala problema cand dau pe Ajutor secundar ma duce la alt dialog o idee ??
-
Problema intalnita (descriere):Am facut comanda /help iar cand tastez /help nu imi apare dialog .
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:Am dat mai jos
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da de foarte multe ori :-kif(strcmp(cmd, "/help", true) == 0) { if(IsPlayerConnected(playerid)) { ShowPlayerDialog(playerid, DIALOG_HELPME, DIALOG_STYLE_LIST,"Help", "1.Ajutor General n 2.Ajutor Secundar n 3.Ajutor Helper n 4.Ajutor Admin n 5.Ajutor VIP", "Select","Cancel"); } return 1; }
-
Problema intalnita (descriere):Am facut comanda /help iar cand tastez /help nu imi apare dialog .
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:Am dat mai jos
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da de foarte multe ori :-kif(strcmp(cmd, "/help", true) == 0) { if(IsPlayerConnected(playerid)) { ShowPlayerDialog(playerid, DIALOG_HELPME, DIALOG_STYLE_LIST,"Help", "1.Ajutor General n 2.Ajutor Secundar n 3.Ajutor Helper n 4.Ajutor Admin n 5.Ajutor VIP", "Select","Cancel"); } return 1; }
-
Cand scriu /newgpspos si numele la locatie imi pica server-ul iar consola se inchide imediat
Uitati eroarea :
[16:31:20] sscanf warning: Strings without a length are deprecated, please add a destination size.
-
Uite pwn.
#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); if(!dfile_DirectoryExists(folder)) { dfile_CreateDirectory(folder); } 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,"s",placename)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /newgpspos [PLACE NAME]"); 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; }
-
Problema intalnita (descriere):Am gasit un system gps si am inceput sa repar din unele erori dar au ramas unele erori care nu stiu ce sa le fac
Ero(area / rile) / warning-(ul / urile):
C:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(67) : warning 217: loose indentation
C:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(83) : error 017: undefined symbol "dir_exists"C:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(85) : error 017: undefined symbol "dfile_CreateDirectory"C:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(121) : warning 217: loose indentationC:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(153) : warning 217: loose indentationC:UsersGhostDesktopServere SAMP GAMEMODEMy Gamemodefilterscriptsgp1.pwn(154) : warning 217: loose indentation#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 0xAFAFAFAAnew 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);if(!dfile_DirectoryExists(folder)){dfile_CreateDirectory(folder);}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,"s",placename)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /newgpspos [PLACE NAME]");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;}
Problema comanda /ridicapayday
in Arhivă probleme
Posted
Deci sa zicem ca eu in fisierul ini am :
Iapayday=10
Am 10 payday-uri de luat.
Ca sa le transform in respect point trebuie sa scriu comanda /ridicapayday .
Trebuie sa imi adauge inca 10 respect point dar mi-a adaugat 453 :|
-----------------------------------
Concluzie: Eu vreau sa transform numarul de payday-uri in respect point.