SetObjectRot, etc.. does not work
#1

Bug: Functions
PHP код:
SetPlayerObjectRot(playeridobjectidFloat:RotXFloat:RotYFloat:RotZ); 
SetObjectRot(objectidFloat:RotXFloat:RotYFloat:RotZ); 
Action: No effect. As the team breaks in the call.

My script:
PHP код:
new car_weapon[1];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
msg[MAX_MSG_SIZE];
if (
strcmp("/arm"cmdtexttrue10) == 0)
    {
        if (
IsPlayerInAnyVehicle(playerid)) {
              
//car_weapon[0] = CreateObject(18848, 0.0,0.0,0.0, 0.0,0.0,0.0, 500.0);
              //AttachObjectToVehicle(car_weapon[0], GetPlayerVehicleID(playerid), 0.0000,-1.5000,-0.5000, 0.0,0.0,0.0);
            
car_weapon[0] = CreatePlayerObject(playerid188480.0,0.0,0.00.0,0.0,0.0500.0);
              
AttachPlayerObjectToVehicle(playeridcar_weapon[0], GetPlayerVehicleID(playerid), 0.0000,-1.5000,-0.50000.0,0.0,0.0);
            return 
1;
        }
    }
    if (
strcmp("/darm"cmdtexttrue10) == 0)
    {
        if(
IsValidObject(car_weapon[0])) DestroyObject(car_weapon[0]);
        else if(
IsValidPlayerObject(playeridcar_weapon[0])) DestroyPlayerObject(playeridcar_weapon[0]);
        return 
1;
    }
    if (
strcmp("/arm180"cmdtexttrue10) == 0)
    {
        new 
Float:rxFloat:ryFloat:rz;
        
//GetObjectRot(car_weapon[0], rx, ry, rz);
        
GetPlayerObjectRot(playeridcar_weapon[0], rxryrz);
        
        
format(msg256"GetObjRot (%d) xyz: %.1f,%.1f,%.1f"car_weapon[0], rxryrz);
        
SendClientMessage(playeridCOLOR_DEFAULTmsg);
        
        
//SetObjectRot(car_weapon[0], rx, 180.0, rz);
        //GetObjectRot(car_weapon[0], rx, ry, rz);
        
        
SetPlayerObjectRot(playeridcar_weapon[0], rx180.0rz);
        
GetPlayerObjectRot(playeridcar_weapon[0], rxryrz);
        
format(msg256"SetObjRot (%d) set_y 180.0 current_rot xyz: %.1f,%.1f,%.1f"car_weapon[0], rxryrz);
        return 
1;
    }
    if (
strcmp("/car"cmdtexttrue10) == 0)
    {
        new 
Float:xFloat:yFloat:zFloat:a;
        
GetPlayerPos(playeridx,y,z);
        
GetPlayerFacingAngle(playerida);
          new 
id CreateVehicle(400+random(212),x,y,za, -1,-160);
          
PutPlayerInVehicle(playeridid0);
        return 
1;
    }
        return 
0;

Reply


Messages In This Thread
SetObjectRot, etc.. does not work - by Logofero - 13.05.2015, 14:17
Re: [Bug/SAMP 0.3.7] SetObjectRot, etc.. does not work - by ikkentim - 13.05.2015, 15:17
Re: [Bug/SAMP 0.3.7] SetObjectRot, etc.. does not work - by Logofero - 13.05.2015, 16:18
AW: SetObjectRot, etc.. does not work - by NaS - 14.05.2015, 16:46
Re: AW: SetObjectRot, etc.. does not work - by Logofero - 14.05.2015, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)