Need goto help a bit - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need goto help a bit (
/showthread.php?tid=122320)
Need goto help a bit -
actiwe - 21.01.2010
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.
Re: Need goto help a bit -
Correlli - 21.01.2010
'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
|
Re: Need goto help a bit -
actiwe - 21.01.2010
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.