SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=548947)



Help - BlackEvils - 03.12.2014

Hi all today im trying to use

public OnPlayerRequestClass( playerid, classid )
{
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
SetPlayerPos(playerid, -3530.6016, 2383.2002, 45.6182);
SetPlayerFacingAngle(playerid, 179.8732);
SetPlayerCameraPos(playerid, -3530.5386, 2364.0100, 48.3573);
SetPlayerCameraLookAt(playerid,-3530.6016, 2383.2002, 45.6182);
SetPlayerSpecialAction(playerid, 6);
SetPlayerHealth(playerid, 1000000);
}
}
return 1;
}

i add objects with CreateDynamicObject when i select the class i don't see the objects what's wrong?


Re: Help - Galletziz - 03.12.2014

You must use:

pawn Код:
native SetDynamicObjectPos(objectid, Float:x, Float:y, Float:z);
and for rotation pos object:

pawn Код:
native SetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz);



Re: Help - Raweresh - 03.12.2014

Код:
native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0);
Are you sure you have correctly arguments? And I think that wouldn't work. For first, in skin browser you see only skins, for second, that skins are in other virtual world. You can set player's virtual world in OnPlayerRequestClass and put objects in that virtual world too, but I think you can't attach any object.


Re: Help - BlackEvils - 03.12.2014

wtf?
CreateDynamicObject(19129, -3520.57983, 2373.12646, 44.63173, 0.00000, 0.00000, 0.00000);

change all to

SetDynamicObjectPos(19129, -3520.57983, 2373.12646, 44.63173);
native SetDynamicObjectRot(19129, 0.00000, 0.00000, 0.00000);

does exist some objects converter for this code?


Re: Help - Raweresh - 03.12.2014

What? You don't need to do this.


Re: Help - BlackEvils - 03.12.2014

Quote:
Originally Posted by Raweresh
Посмотреть сообщение
What? You don't need to do this.
How for make working it ?


Re: Help - Galletziz - 03.12.2014

if you want that your code works replace CrateDynamicObject, with CreateObject..

Pace.


Re: Help - RonnyCZ - 03.12.2014

SetPlayerHealth(playerid, 1000000); ?


Re: Help - BlackEvils - 03.12.2014

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
if you want that your code works replace CrateDynamicObject, with CreateObject..

Pace.
Don't work


Re: Help - Galletziz - 03.12.2014

Sorry, i have write a bullshit..

have you tryed with this?
pawn Код:
CreatePlayerObject(playerid, 3, 0.120000, 0.040000, -0.003500, 0, 0, 0);