12.06.2013, 22:43
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;