27.08.2013, 19:36
Hi, I've created this goto command, just
what string I have to put to show a player this 3 "warning or error" in to the game?
Player not connected
Invalid player id or You can't goto to your self
Here's the code:
Thanks for the help!
what string I have to put to show a player this 3 "warning or error" in to the game?
Player not connected
Invalid player id or You can't goto to your self
Here's the code:
Код:
if(strcmp(cmd, "/goto", true) == 0)
{
new str[256];
tmp = strtok2(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xbbff0000 , "/goto [playerid]");
return 1;
}
new tmpplayer = ReturnUser(tmp);
new Float:tmpx, Float:tmpy, Float:tmpz;
new name[MAX_PLAYER_NAME];
GetPlayerName(tmpplayer, name, sizeof(name));
GetPlayerPos(tmpplayer, tmpx, tmpy, tmpz);
SetPlayerPos(playerid, tmpx, tmpy, tmpz+1);
format(str, sizeof(str), "You have teleported to %s(ID:%d)", name, tmpplayer);
SendClientMessage(playerid, 0x00bbbb00 , str);
return 1;
}

