Unique Posted April 18, 2016 Report Share Posted April 18, 2016 Buna ziua acum 1-2 ore am implementat sistemul /getgift , totul merge perfect ! Imi da la fiecare payday 1 giftpoint's , merge sa iau cadourile , merge sa dau la toti giftpoints merge tot. Problema este ca daca ies de pe server nu mi se salveaza giftpoint's ! E urgent puteti sa-mi dati o solutie ? Quote Link to comment Share on other sites More sharing options...
0 Extremys Posted April 18, 2016 Report Share Posted April 18, 2016 Ne arati si noua comenzile? Quote Link to comment Share on other sites More sharing options...
0 Unique Posted April 18, 2016 Author Report Share Posted April 18, 2016 (edited) CMD:getgift(playerid, params[]) { if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); // Verifica daca-i logat if(PlayerInfo[playerid][pGift] == 0) return SendClientMessage(playerid, COLOR_WHITE, "Ai nevoie de minim 1 Gift Point pentru a putea folosi comanda."); // Iii trimite un mesaj daca nu are giftpoints switch(random(6)) // Aici e facut sa iti deie randem din cele 2 case-uri tu poti adauga case 3 case 4 etc.. si pentru fiecare case nou modifici in switch(random(3)) switch(random(4)) sau cate ai. { case 0: { new rp = 1 + random(5);// Aici poti baga sa-i adauge cat rp vrei tu eu am pus 5 format(gString,sizeof(gString),"* Ai primit %s puncte de respect.",FormatNumber(rp)); SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); PlayerInfo[playerid][pRespect] += rp; Update(playerid, pRespectx); GameTextForPlayer(playerid, "~g~ Ai primit puncte de respect !", 5000, 1); } case 1: { new cash = 100000 + random(1000000); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $ format(gString,sizeof(gString),"* Ai primit %s$.",FormatNumber(cash)); // aici il scrie SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); GivePlayerCash(playerid, cash); GameTextForPlayer(playerid, "~g~Ai primit bani !", 5000, 1); } case 2: { new rob = 1 + random(3); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $ format(gString,sizeof(gString),"* Ai primit %s puncte de rob.",FormatNumber(rob)); // aici il scrie SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); PlayerInfo[playerid][pRob] += rob; Update(playerid, pRobx); GameTextForPlayer(playerid, "~g~Au primit puncte rob !", 5000, 1); } case 3: { new mats = 1000 + random(5000); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $ format(gString,sizeof(gString),"* Ai primit %s materiale.",FormatNumber(mats)); // aici il scrie SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); PlayerInfo[playerid][pMats] += mats; Update(playerid, pMatsx); GameTextForPlayer(playerid, "~g~Ai primit materiale !", 5000, 1); } case 4: { new drugs = 10 + random(50); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $ format(gString,sizeof(gString),"* Ai primit %s droguri.",FormatNumber(drugs)); // aici il scrie SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); PlayerInfo[playerid][pDrugs] += drugs; Update(playerid, pDrugsx); GameTextForPlayer(playerid, "~g~Ai primit droguri !", 5000, 1); } case 5: { new hoursplayed = 1 + random(5); // Castiga o suma de bani 100.000 $ + random din suma de 200.000 $ format(gString,sizeof(gString),"* Ai primit %s ore.",FormatNumber(hoursplayed)); // aici il scrie SendClientMessage(playerid, COLOR_SYN, gString);//aici afiseaza mesajul PlayerInfo[playerid][pGift] -= 1; Update(playerid, pGiftx); PlayerInfo[playerid][pHoursPlayed] += hoursplayed; Update(playerid, pHoursPlayedx); GameTextForPlayer(playerid, "~g~Ai primit ore !", 5000, 1); } } return 1; } Edited April 18, 2016 by Unique Quote Link to comment Share on other sites More sharing options...
0 Mihail. Posted April 18, 2016 Report Share Posted April 18, 2016 Daca nu se salveaza giftpoint nu ai facuta structura in gm si mysql, ce gm folosesti? Quote Link to comment Share on other sites More sharing options...
0 ReD_BuLL Posted April 18, 2016 Report Share Posted April 18, 2016 Lasa-mi skype-ul tau aici ca te ajut eu Quote Link to comment Share on other sites More sharing options...
0 Unique Posted April 18, 2016 Author Report Share Posted April 18, 2016 skype : geo.gm Quote Link to comment Share on other sites More sharing options...
0 M3TrickZz Posted April 19, 2016 Report Share Posted April 19, 2016 Acum 20 ore, Unique a spus: Buna ziua acum 1-2 ore am implementat sistemul /getgift , totul merge perfect ! Imi da la fiecare payday 1 giftpoint's , merge sa iau cadourile , merge sa dau la toti giftpoints merge tot. Problema este ca daca ies de pe server nu mi se salveaza giftpoint's ! E urgent puteti sa-mi dati o solutie ? Salut, am vazut ca nu te-a lamurit nimeni cu problema ta ... te ajut eu , nu stiu 100% daca merge ca difera de GameMode, dar macar hai sa incercam .. Bun, deci te duci in baza de date si creezi un nou "column" numit "GPoints" , recomand sa il pui ultimul, dupa ce termini asta deschizi GM-ul si te duci in public Update(playerid, type) si la sfarsit bagi asta case pGiftx: { mysql_format(SQL,var,sizeof(var),"UPDATE`users`SET`GPoints`='%d'WHERE`name`='%s'",PlayerInfo[playerid[pGift],PlayerInfo[e]; mysql_tquery(SQL,var,"",""); } sper ca te-am ajutat.. succes! Quote Link to comment Share on other sites More sharing options...
0 Unique Posted April 19, 2016 Author Report Share Posted April 19, 2016 Merci ! Quote Link to comment Share on other sites More sharing options...
Question
Unique
Buna ziua acum 1-2 ore am implementat sistemul /getgift , totul merge perfect !
Imi da la fiecare payday 1 giftpoint's , merge sa iau cadourile , merge sa dau la toti giftpoints merge tot.
Problema este ca daca ies de pe server nu mi se salveaza giftpoint's !
E urgent puteti sa-mi dati o solutie ?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.