[Ajuda] Verificar Pos dos pneus?
#1

Alguem poderia me dizer qual a funзгo que identifica se o player estб perto do pneu do carro ou nгo ?
Reply
#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
#3

vlw, vou estudar essa inc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)