Need goto help a bit
#1

pawn Код:
CMD:goto(playerid, params[])
{
    new id;
    if (sscanf(params, "u" , id)) return SendClientMessage(playerid, LIGHTGREEN, "USAGE: /goto [playerID]");
   
    new Float:idx, Float:idy, Float:idz;
    GetPlayerPos(id, idx, idy, :idz);
    SetPlayerPos(playerid, idx, idy, idz);
    return 1;
}
This is very simple goto command..can anybody help me to make this that i can use part of another player name to teleport him.
I'm using sscanf2.
Reply
#2

'u' specifier should work for name, too.

Quote:
u User name/id (bots and players) ******, 0
q Bot name/id ShopBot, 27
r Player name/id ******, 42
Reply
#3

Hmm, shall I do like this ?
new id[32];
At the moment if i type any phrase of any player name it just return me the usage.

Lol i had typo...Thanks anyways Don Correll.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)