RABIGKY
Membru-
Posts
26 -
Joined
-
Last visited
Profile Information
-
Sex
Masculin
-
In-game Name
RABIGKY
-
Level of knowledge
Mediu
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
RABIGKY's Achievements
-
CMD:goto(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) return Admin; new places[64]; switch(YHash(places)) { case _H<ls>: { SetPlayerPos(playerid, Float:x, Float:y, Float:z); SCM(playerid, COLOR_YELLOW, "Te-ai teleportat in orasul LS."); } case _H<lv>: { SetPlayerPos(playerid, Float:x, Float:y, Float:z); SCM(playerid, COLOR_YELLOW, "Te-ai teleportat in orasul LV."); } case _H<sf>: { SetPlayerPos(playerid, Float:x, Float:y, Float:z); SCM(playerid, COLOR_YELLOW, "Te-ai teleportat in orasul SF."); } default: { SCM(playerid, -1, "Syntax: /goto <LS/LV/SF>"); } } return 1; } Pentru mine ar fi fost mai simplu sa fac ceva de genu'...
-
Hai noroc! Astazi m-am decis sa va arat cum am facut eu job-ul de fisherman. Job-ul nu este deloc unul wow, dar pentru inceput merge, voi puteti sa-l dezvoltati sa-l faceti cum doriti.. In primul rand facem o variabila de genu' new CaughtFish[MAX_PLAYERS]; // Daca a prins peste sa nu mai poata pescuii in continuare. new Job[MAX_PLAYERS]; // Daca are deja un job sa nu poata lua altul. Mergem la enum pInfo (in cazul meu) si adaugam. enum pInfo { pJobFish } new PlayerInfo[MAX_PLAYERS][pInfo]; Mai facem un enum, unde vom pune dialogurile enum { DIALOG_JOBS } Bun, acum vom face comanda '/jobs' pentru a vedea job-urile de pe server. CMD:jobs(playerid, params[]) { new string[80]; // Creem un string, l-am facut de 80 dar voi il puteti facei mai mare/mic in functie de caractere format(string, sizeof(string), "Fish\t\t%0.2f m", GetPlayerDistanceFromPoint(playerid, 2380.9233, 548.5172, 7.7802)); // Job-ul se numeste 'Fish' iar '%0.2f m' reprezinta distanta de la jucator la job ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_LIST, "JOBS", string, "Gata", "Anuleaza"); Si aici aratam dialog-ul return 1; } Mergem la OnDialogResponse si adaugam case DIALOG_JOBS: { switch(listitem) // in functie de ce alege { case 0: // am facut doar un caz, caz-ul 'Fish' { SetPlayerCheckpoint(playerid, 2380.9233, 548.5172, 7.7802, 5.0); // Daca apasa pe el ii seteaza checkpoint la job. new string[60]; format(string, sizeof(string), "Ti-am pus un checkpoint pe harta (%0.2f m).", GetPlayerDistanceFromPoint(playerid, 2380.9233, 548.5172, 7.7802)); Aici il anuntam ca i-am pus checkpoint, si la ce distanta se afla fata de el. } } } Vom creea comanda '/getjob' CMD:getjob(playerid, params[]) { if(Job[playerid] == 1) return SCM(playerid, COLOR_RED, "[JOB]: {FFFFFF}Ai deja un job, foloseste '/quitjob' pentru a demisiona."); // Daca are deja un job sa nu poata lua job-ul if(IsPlayerInRangeOfPoint(playerid, 5.0, 2380.9233, 548.5172, 7.7802)) // Daca se afla in locul potrivit { Job[playerid] = 1; // Ii setam sa aibe un job PlayerInfo[playerid][pJobFish] = 1; // Si ii setam JobFish 1 pentru a putea pescuii SCM(playerid, COLOR_CYAN, "[JOB]: Te-ai angajat ca Fisherman."); // Aici il anuntam ca s-a angajat } return 1; } Acum facem comanda '/quitjob' CMD:quitjob(playerid, params[]) { if(Job[playerid] == 0) return SCM(playerid, COLOR_RED, "[JOB]: {FFFFFF}Nu ai nici un job."); // Daca nu are nici un job, nu poate demisiona SCM(playerid, COLOR_YELLOW, "[JOB]: Ai demisionat de la locu' de munca."); // il anuntam ca a demisionat. Job[playerid] = 0; // ii scoatem job-ul PlayerInfo[playerid][pJobFish] = 0; // ii scoate si job-ul de pescar. // Aici puteti adauga mai multe PlayerInfo[playerid][pGarbageMan] = 0; sau ce job aveti voi pentru a nu mai putea lucra return 1; } Facem un timer de genu' new timer_fish[MAX_PLAYERS]; Si comanda '/fish' unde vom folosi timer-ul si pe care o v-a folosi pentru a pescuii CMD:fish(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 30.0, 2380.9233, 548.5172, 7.7802)) return SCM(playerid, COLOR_RED, "[JOB]: {FFFFFF}Nu te afli in locul potrivit."); // Daca nu se afla in locul potrivit il anuntam if(PlayerInfo[playerid][pJobFish] == 0) return SCM(playerid, COLOR_RED, "[FISH]: {FFFFFF} Nu ai job-ul de Fisherman."); // Daca nu are job-ul de Fisherman sa nu poate pescuii if(CaughtFish[playerid] == 1) return SCM(playerid, COLOR_RED, "[FISH]: {FFFFFF} Ai deja un peste du-te si vinde-l."); // Daca a prins deja un peste sa nu mai poata pescuii if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_RED, "[FISH]: {FFFFFF} Mai intai trebuie sa te dai jos din vehicul."); // Daca e intr-un vehicul mai intai sa se dea jos CaughtFish[playerid] = 1; // Aici ii setam ca a prins peste timer_fish[playerid] = SetTimerEx("Fish", 5000, false, "i", playerid); // Un timer de 5 secunde pentru a nu spama TogglePlayerControllable(playerid, false); // Sa nu se poata misca timp de 5 secunde return 1; } Si acum cand se termina timer-ul vom adauga forward Fish(playerid); public Fish(playerid) { KillTimer(timer_fish[playerid]); // "Omoram" timer-ul TogglePlayerControllable(playerid, true); // Acum se poate misca new amount = 10000 + random(40000); // Cand prinde un peste sa primeasca o suma intre 10.000 - 50.000 (schimbati cum vreti) new string[100]; format(string, sizeof(string), "[FISH]: Ai prins un peste de $ %d, du-te si vinde-l la un 24/7,", amount); // il anuntam ca a prins un peste si cat costa acesta SCM(playerid, COLOR_YELLOW, string); return 1; } ASTA A FOST TUTORIALUL, NU ESTE NIMIC WOW DELOC!! ESTE CEVA PENTRU INCEPATORI ( NU CA AS FI EU VREUN MARE SCRIPTER)!! SPER CA V-A FOST DE FOLOS.. IMI CER SCUZE DACA AM GRESIT UNDEVA, MA ANUNTATI SI REZOLVAM VA PUP
-
Mai uita-te inca odata la GroWy si vezi cum a facut el Omu' a facut tutorial pe yt si tu nu esti in stare sa copiezi...Urat...
-
stai, ca-ti dau mesaj sa nu facem aici spam
-
if (newkeys & KEY_CROUCH )// daca apasa tasta KEY_CROUCH if(!IsACop(playerid)) return SCM(playerid, -1, "Nu poti deschide poarta deoarece nu esti politist!"); if(IsPlayerInRangeOfPoint(playerid, 15, 1586.81323, -1637.93604, 14.95745)) { MoveObject(GatePD1, 1586.81323, -1637.93604, 9.52512, 5.0, 0.00000, 0.00000, 0.00000); SetTimer("MoveGatePd1",5000,0); SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!"); } Vezi acum..
-
Vezi acea acolada "}" nu ai pus-o bine, pune-o in rand cu cealalta "{"
-
Oke, am rezolvat problema cu "params", mersi Acum imi apar celelalte erori 1015,1023,1031,1047,1063... Vreo idee?
-
Salut, am incercat sa fac ca motorul masinii si luminile sa le porneasca player-ul manual... si am primit erorile astea, vreo idee? EDIT: v-am scris nr. randurilor, poate asa va dati seama...
-
M-am uitat si nu mai este definit.....
-
Salut, am luat si eu gm-ul de la Edison(Gamemode de la 0) pe care am vrut sa incep sa lucrez, sa mai invat unele lucruri.. etc Si am primit asta, aveti idee de ce? SA-MP RPG Server\gamemodes\RPG.pwn(2502) : error 025: function heading differs from prototype SA-MP RPG Server\gamemodes\RPG.pwn(2502) : error 025: function heading differs from prototype SA-MP RPG Server\gamemodes\RPG.pwn(2502) : error 021: symbol already defined: "Range" SA-MP RPG Server\gamemodes\RPG.pwn(2502) : fatal error 107: too many error messages on one line Si asta este linia/functia ... function Range(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1; } return 0; }
-
Stiu ca e putin cam tarziu...Da' daca te ajuta poftim [pawn] CMD:admins(playerid) { SCM(playerid, COLOR_LIGHTBLUE, "---===ADMINS===---"); if(PlayerInfo[id][pAdmin] == 1) { new string[80]; format(string, sizeof(string), "Admin-Trial: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 2) { new string[80]; format(string, sizeof(string), "Admin 1: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 3) { new string[80]; format(string, sizeof(string), "Admin 2: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 4) { new string[80]; format(string, sizeof(string), "Admin 3: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 5) { new string[80]; format(string, sizeof(string), "Moderator: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 6) { new string[80]; format(string, sizeof(string), "Co-Owner: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } else if(PlayerInfo[id][pAdmin] == 7) { new string[80]; format(string, sizeof(string), "Owner: %s", GetName(id)); SCM(playerid, COLOR_LIGHTBLUE, string); } SCM(playerid, COLOR_LIGHTBLUE, "---===----===---"); return 1; }[/pawn]
-
Salut, inlocuiesti comanda aia cu asta daca doresti CMD:makeadmin(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] == 7) { new string[50], id, amount; if(sscanf(params, "ui", id, amount)) return SCM(playerid, -1, "SYNTAX:/makeadmin <ID> <1-7>"); format(string, sizeof(string), "%s ti-a setat admin-ul la %d.", GetName(playerid), amount); SCM(playerid, 0x00FF66, string); PlayerInfo[playerid][pAdmin] = amount; gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `conturi` SET `Admin`='%d' WHERE `ID`='%d'", GetPlayerScore(playerid), PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL, gQuery, "", ""); } else { SCM(playerid, 0xFF0000, "[SERVER]: Nu ai gradul necesar."); } return 1; } Daca ai vreo problema cu aceasta comanda, da-mi pm.. Sper ca te-am ajutat
-
S-a rezolvat datorita lui [El.Capo], multumesc