Advertisement
Guest User

Untitled

a guest
Aug 9th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. //dialog
  2. if(eventobjects != 0)
  3. {
  4. for(new obj=0; obj<11; obj++)
  5. {
  6. if(pickupid == objectevent[obj])
  7. {
  8. new string[128],name[30];
  9. GetPlayerName(playerid, name, sizeof(name));
  10. GivePlayerCash(playerid,eventprizeobj[obj]);
  11. Update(playerid,pCashx);
  12. format(string,sizeof(string),"Event: Un obiect din event a fost gasit de %s. Acesta a castigat un premiu de $%s !",name,FormatNumber(eventprizeobj[obj]));
  13. OOCNews(COLOR_ORANGE,string);
  14. if(eventobjects > 0)
  15. {
  16. format(string,sizeof(string),"Event: Eventul continua. Mai sunt %d obiecte de gasit !",eventobjects);
  17. }
  18. else
  19. {
  20. format(string,sizeof(string),"Event: Eventul a luat sfarsit. Multumim pentru participare !");
  21. }
  22. OOCNews(COLOR_ORANGE,string);
  23. objectevent[obj] = 0;
  24. eventprizeobj[obj] = 0;
  25. DestroyPickup(objectevent[obj]);
  26. eventobjects--;
  27. }
  28. }
  29. }
  30. //comanda
  31. CMD:oplace(playerid, params[])
  32. {
  33. if(gPlayerLogged[playerid] == 0) return SCM(playerid, COLOR_LIGHTRED, "Nu esti logat.");
  34. if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid,COLOR_ERROR, AdminOnly);
  35. if(eventobjects > 9) return SCM(playerid,COLOR_WHITE,"{FFB870}Nu poti pune mai mult de 10 obiecte.");
  36. new objectid,prize,sendername[30],Float:pX,Float:pY,Float:pZ,string[128];
  37. if(sscanf(params, "dd",objectid,prize))
  38. {
  39. SendClientMessage(playerid, COLOR_WHITE, "{25FDE9}Scrie: {25FDE9}/oplace <ObjectID> <Prize>");
  40. SendClientMessage(playerid, COLOR_WHITE,"[OBJECTS] Cadou: 19054 - 19058 | Glob craciun: 19059 - 19063 | Oua paste: 19341 - 19345 | Balon: 19332 - 19338");
  41. return 1;
  42. }
  43. if(prize < 500000 || prize > 30000000) return SendClientMessage(playerid, COLOR_WHITE, "Prize must be between $500.000 and $30.000.000.");
  44. GetPlayerName(playerid, sendername, sizeof(sendername));
  45. GetPlayerPos(playerid,pX,pY,pZ);
  46. eventobjects++;
  47. objectevent[eventobjects] = CreatePickup(objectid, 2, pX+2,pY,pZ, -1);
  48. eventprizeobj[eventobjects] = prize;
  49. Adminlog(string);
  50. return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement