[question] playerid
#1

hello, was wondering how I know playerid a User ...
and as I turn the player back to where it left last time?
Reply
#2

Can you make your query a little clearer ?
Reply
#3

I think he's asking how to identify a player, and how to make him spawn at last position he was at when he left.
Reply
#4

austin070 yes that's right!

you can help my question ?
Reply
#5

you can identify a player as playerid.
you can return a player to his old position saving the pos when the player leaves the server and when he connects again load the user file and check the pos, and then set his pos to X.
Reply
#6

How i find playerid of a User?
AND
How I Faso for him to come in the last coordinate a User?
Reply
#7

pawn Код:
GetPlayerID( const name[ ], partofname=true/false );
You want a CMD like GOTO [ID] ?
If so, then:
sscanf + zcmd
pawn Код:
CMD:goto( playerid, params[ ] )
{
    if( !IsPlayerAdmin( playerid ) ) return false;
    new id; if( sscanf( params, "u", id ) ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /goto [ID]" );
    if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID" );
    new Float:pos[ 2 ];
    GetPlayerPos( id, pos[ 0 ], pos[ 1 ], pos[ 2 ] );
    SetPlayerPos( playerid, pos[ 0 ], pos[ 1 ], pos[ 2 ] );
    new string[ 128 ];
    new name[ 24 ]; GetPlayerName( id, name, 24 );
    format( string, sizeof string, "You have teleported to %s", name );
    return SendClientMessage( playerid, 0xAAAAAA, string );
}
Reply
#8

Quote:
Originally Posted by JOKERBOY
Посмотреть сообщение
How i find playerid of a User?
AND
How I Faso for him to come in the last coordinate a User?
The playerid is not an user id, it's the id which he enters in the server.

You have to register it by creating files.
Reply
#9

ok !
But how i can registres the users ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)