I'm new on SAMP - 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: I'm new on SAMP (
/showthread.php?tid=280064)
I'm new on SAMP -
MuhammadFajar - 30.08.2011
I'm new on SAMP, and I just need some help,
How to coordinates object position ?
I want to make an object, but I don't know how to place object, to right place.
Please, help me!
Re: I'm new on SAMP -
=WoR=Varth - 30.08.2011
Do /save inside samp(ingame). The coordinate is saved inside your samp user file(My document\samp\I forgot the fle name
Re: I'm new on SAMP -
Jafet_Macario - 30.08.2011
Go to your desired position ingame, type /save then go to \Documents\GTA San Andreas User Files\SAMP\savedpoitions.txt And you have it there, then use:
https://sampwiki.blast.hk/wiki/CreateObject
For more information:
https://sampforum.blast.hk/showthread.php?tid=92
Re: I'm new on SAMP -
MuhammadFajar - 30.08.2011
Thank you so much!
Then how to rotate vehicle, or set camera position ?
Re: I'm new on SAMP -
Universal - 30.08.2011
Quote:
Originally Posted by MuhammadFajar
Thank you so much!
Then how to rotate vehicle, or set camera position ?
|
You can rotate the vehicle by using this function:
SetVehicleZAngle
But There must be a player inside the vehicle, otherwise it wont work.
Re: I'm new on SAMP -
MuhammadFajar - 30.08.2011
Quote:
You can rotate the vehicle by using this function: SetVehicleZAngle
But There must be a player inside the vehicle, otherwise it wont work.
|
Please Explain to me
Re: I'm new on SAMP -
Universal - 30.08.2011
Quote:
Originally Posted by MuhammadFajar
Please Explain to me
|
Here's a simple command example:
In the:
Put this line:
pawn Код:
new gVehicle = CreateVehicle( 560, 40.0, 50.0, 60.0, 70.0, 0, 0, -1 ); // Change the position of X,Y,Z
And then under the:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
Put this:
pawn Код:
if( strcmp( cmdtext, "/rotate", true ) == 0 )
{
new
Float: tmpRot ,
string[ 129 ] ;
GetPlayerFacingAngle( playerid, tmpRot );
SetVehicleZAngle( gVehicle, tmpRot );
format( string, sizeof( string ), "You've rotated the vehicle to Z angle: %f.", tmpRot );
SendClientMessage( playerid, -1, string );
return 1;
}
Re: I'm new on SAMP -
MuhammadFajar - 30.08.2011
So, this is in-game command?
Nice, Thank you!!