[please help!] getpos - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [please help!] getpos (
/showthread.php?tid=170278)
[please help!] getpos -
bobintom - 22.08.2010
Hi
obviosly no one new the answer to my other post.
Help me
i want it so i can type /seteventpos and it gets the position of the person so when people type /joinevent it will take the people to that possition. please tell me how to do this.
I really need it for the events
thanks
----------------------------------------------------------------------------------------------------
Re: [please help!] getpos -
ZeRo_HUN - 22.08.2010
Try this:
pawn Код:
static Float: eventPos[ 3 ];
public OnPlayerCommandText( playerid, cmdtext[ ] ) {
if( !strcmp( "/seteventpos", cmdtext, true ) ) {
new Float: playerPos[ 3 ];
GetPlayerPos( playerid, playerPos[ 0 ], playerPos[ 1 ], playerPos[ 2 ] );
eventPos = playerPos;
return 1;
}
if( !strcmp( "/joinevent", cmdtext, true ) ) {
SetPlayerPos( playerid, eventPos[ 0 ], eventPos[ 1 ], eventPos[ 2 ] );
return 1;
}
return 0;
}