[Ajuda] Verificar Pos dos pneus?
#2

Utilize a funзгo GetVehicleModelInfo para pegar as informaзхes do offset do pneu do veнculo.

Depois de pegar o offset sу usar a include 3DTryg para pegar as coordenadas, exemplo do criado da include de como fazer:

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
//edit:

http://i.imgur.com/nxqBRUQ.png

PHP код:
CMD:petrolcap(playerid){ 
    new 
vid GetPlayerVehicleID(playerid), 
        
Float:xFloat:yFloat:zFloat:rxFloat:rz
        
Float:vxFloat:vyFloat:vzFloat:angle;
     
    
GetVehiclePos(vid,vx,vy,vz); 
    
GetVehicleZAngle(vid,angle); 
    
GetVehicleModelInfo(GetVehicleModel(vid),VEHICLE_MODEL_INFO_PETROLCAP,x,y,z); 
    if(
GetRotationFor2Point3D(0.0,0.0,0.0,x,y,z,rx,rz)){ 
        new 
Float:dist VectorSize(x,y,z) + 1.0
        
GetPointInFront3D(vx,vy,vz,rx,CompRotationFloat(angle+rz),dist,x,y,z);
        
SetPlayerCheckpoint(playerid,x,y,z,3.0); 
    } else { 
        
//doesn't have petrolcap (0.0,0.0,0.0) 
    

    return 
1

3DTryg:
https://sampforum.blast.hk/showthread.php?tid=591010
Reply


Messages In This Thread
Verificar Pos dos pneus? - by Syxh0wN - 30.03.2019, 22:49
Re: Verificar Pos dos pneus? - by MultiKill - 31.03.2019, 00:04
Re: Verificar Pos dos pneus? - by Syxh0wN - 31.03.2019, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)