Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. forward UcitajDrogu();
  2. public UcitajDrogu()
  3. {
  4. new rows, fields;
  5. cache_get_row_count(rows);
  6. cache_get_field_count(fields);
  7. new drg = 0;
  8. if(rows)
  9. {
  10. while(drg<rows)
  11. {
  12. cache_get_value_name_int(sm,"drgfraktid",DrugInfo[drg][drgfraktid]);
  13. cache_get_value_name_int(sm,"drgArt",DrugInfo[drg][drgArt]);
  14. cache_get_value_name_float(sm,"drgXpos",DrugInfo[drg][drgXpos]);
  15. cache_get_value_name_float(sm,"drgYpos",DrugInfo[drg][drgYpos]);
  16. cache_get_value_name_float(sm,"drgZpos",DrugInfo[drg][drgZpos]);
  17. cache_get_value_name_int(sm,"drginterior",DrugInfo[drg][drginterior]);
  18. cache_get_value_name_int(sm,"drgvirtualworld",DrugInfo[drg][drgvirtualworld]);
  19. cache_get_value_name_int(sm,"drgProduceDrugs",DrugInfo[drg][drgProduceDrugs]);
  20. cache_get_value_name_int(sm,"drgNextDrugsIn",DrugInfo[drg][drgNextDrugsIn]);
  21. cache_get_value_name_int(sm,"drgWasserzustand",DrugInfo[drg][drgWasserzustand]);
  22. cache_get_value_name(sm,"drgOwner",DrugInfo[drg][drgOwner], 24);
  23. switch(DrugInfo[drg][drgArt])
  24. {
  25. case 1://Ganja
  26. {
  27. DrugInfo[drg][drgobject] = CreateDynamicObject(822,DrugInfo[drg][drgXpos],DrugInfo[drg][drgYpos],DrugInfo[drg][drgZpos],0.0,0.0,0.0,DrugInfo[drg][drgvirtualworld]);
  28. }
  29. }
  30. format(result,sizeof(result),"Pflanzen-ID %i\n%s\nBesitzer: %s,%s\nDrogenmenge: %ig\nNeue Drogen in %i:%02d Minuten\nWasserzustand: %i%",drg,DrugArtByName(DrugInfo[drg][drgArt]),DrugInfo[drg][drgOwner],FraktionsName(DrugInfo[drg][drgfraktid]),DrugInfo[drg][drgProduceDrugs],DrugInfo[drg][drgNextDrugsIn]/60,DrugInfo[drg][drgNextDrugsIn]%60,DrugInfo[drg][drgWasserzustand]);
  31. DrugLabel[drg] = CreateDynamic3DTextLabel(result,GRUEN,DrugInfo[drg][drgXpos],DrugInfo[drg][drgYpos],DrugInfo[drg][drgZpos],7.5,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,DrugInfo[drg][drgvirtualworld]);
  32. drg++;
  33. }
  34. }
  35. SetTimer("OnDrugVeganceUpdate",60000,1);
  36. printf("SERVER » Drogenpflanzen geladen %i/%i",rows,MAX_DRUGS);
  37. return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement