yello, help with goto - 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: yello, help with goto (
/showthread.php?tid=233022)
yello, help with goto -
tanush - 28.02.2011
help please, when i do /goto <id>, i teleported to ls
pawn Код:
dcmd_GOTO(playerid,params[])
{
new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
new tmp[256], Index;
tmp = strtok(params,Index), id = strval(tmp);
GetPlayerName(id,on,sizeof(on));
GetPlayerName(playerid,n,sizeof(n));
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level 1 to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,RED,"USAGE: /goto <ID> ");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"Invalid ID");
SendClientMessage(id,ORANGE, "An Admin has teleported to you.");
SetPlayerPos(playerid,id,id,id);
return 1;
}
Re: yello, help with goto -
tanush - 28.02.2011
please help!
Re: yello, help with goto -
Fj0rtizFredde - 28.02.2011
You got the get the taget's postion
pawn Код:
new Float: Pos[3];
GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
Re: yello, help with goto -
tanush - 28.02.2011
thanks
Re: yello, help with goto -
CJ101 - 28.02.2011
Dont use 256 for your arrays when you dont need it. Use someting like 100. And DCMD is old and outdated, you should look into using zcmd.