[please help!] getpos
#1

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


----------------------------------------------------------------------------------------------------
Reply
#2

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)