Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward UcitajDrogu();
- public UcitajDrogu()
- {
- new rows, fields;
- cache_get_row_count(rows);
- cache_get_field_count(fields);
- new drg = 0;
- if(rows)
- {
- while(drg<rows)
- {
- cache_get_value_name_int(sm,"drgfraktid",DrugInfo[drg][drgfraktid]);
- cache_get_value_name_int(sm,"drgArt",DrugInfo[drg][drgArt]);
- cache_get_value_name_float(sm,"drgXpos",DrugInfo[drg][drgXpos]);
- cache_get_value_name_float(sm,"drgYpos",DrugInfo[drg][drgYpos]);
- cache_get_value_name_float(sm,"drgZpos",DrugInfo[drg][drgZpos]);
- cache_get_value_name_int(sm,"drginterior",DrugInfo[drg][drginterior]);
- cache_get_value_name_int(sm,"drgvirtualworld",DrugInfo[drg][drgvirtualworld]);
- cache_get_value_name_int(sm,"drgProduceDrugs",DrugInfo[drg][drgProduceDrugs]);
- cache_get_value_name_int(sm,"drgNextDrugsIn",DrugInfo[drg][drgNextDrugsIn]);
- cache_get_value_name_int(sm,"drgWasserzustand",DrugInfo[drg][drgWasserzustand]);
- cache_get_value_name(sm,"drgOwner",DrugInfo[drg][drgOwner], 24);
- switch(DrugInfo[drg][drgArt])
- {
- case 1://Ganja
- {
- DrugInfo[drg][drgobject] = CreateDynamicObject(822,DrugInfo[drg][drgXpos],DrugInfo[drg][drgYpos],DrugInfo[drg][drgZpos],0.0,0.0,0.0,DrugInfo[drg][drgvirtualworld]);
- }
- }
- 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]);
- 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]);
- drg++;
- }
- }
- SetTimer("OnDrugVeganceUpdate",60000,1);
- printf("SERVER » Drogenpflanzen geladen %i/%i",rows,MAX_DRUGS);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement