Random pickups on mapped terrain
#1

hello. Is it possible to make random pickups on a map ( made with map constructor above the sky ) without taking a lot of coordinates by myself?
Reply
#2

The problem is that it can draw a point on the water

MapAndreas: https://sampforum.blast.hk/showthread.php?tid=275492

PHP код:
stock GetRandomPointInCube(Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz,&Float:x,&Float:y,&Float:z){
    new 
cx,cy,cz;
    
cx floatround(floatsqroot(floatpower(minx-maxx,2)));
    
cy floatround(floatsqroot(floatpower(miny-maxy,2)));
    
cz floatround(floatsqroot(floatpower(minz-maxz,2)));
    
random(cx)-(cx/2);
    
random(cy)-(cy/2);
    
random(cz)-(cz/2);
}


new 
Float:myxFloat:myyFloat:myz;
GetRandomPointInCube(-3000.0,-3000.0,1.0,3000.0,3000.0,500.0,myx,myy,myz);
MapAndreas_FindZ_For2DCoord(myx,myy,myz);
myz += 1.0//match 
Reply


Forum Jump:


Users browsing this thread: