Teleport
#2

pawn Код:
if (strcmp("/pq", cmdtext, true) == 0)
    {
        SetPlayerPos(playerid, 1519.7275,-1659.0162,13.2662,184.9231);
        SendClientMessage(playerid, "You have teleported to Pershing Square");
                new name [MAX_PLAYER_NAME]; // variabile where you store his name
                GetPlayerName (playerid, name, 24); // here you get his name, 24 = MAX_PLAYER_NAME you can use MAX_PLAYER_NAME too
                new name[128]; // i used 128 here, but you can balance the size based on your message: has teleported to length: 21 + 24 (player name) + 1 (\0) + x (place length)
                format (string, sizeof string, "%s has teleported to blabla", name);
        SendClientMessageToAll(-1, string);
        return 1;
    }
    return 0;
Reply


Messages In This Thread
Teleport - by lsreskjn - 12.06.2013, 22:36
Re: Teleport - by ReVo_ - 12.06.2013, 22:43
Re: Teleport - by lsreskjn - 12.06.2013, 22:52
Re: Teleport - by ReVo_ - 12.06.2013, 22:56
Re: Teleport - by lsreskjn - 12.06.2013, 23:07
Re: Teleport - by Riddick94 - 12.06.2013, 23:16
Re: Teleport - by feartonyb - 12.06.2013, 23:16
Re: Teleport - by lsreskjn - 12.06.2013, 23:19
Re: Teleport - by feartonyb - 12.06.2013, 23:22
Re: Teleport - by lsreskjn - 12.06.2013, 23:25

Forum Jump:


Users browsing this thread: 1 Guest(s)