SA-MP Forums Archive
Need help with teleporting system - 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 help with teleporting system (/showthread.php?tid=225345)



Need help with teleporting system - spedico - 13.02.2011

pawn Код:
COMMAND:tp(playerid, params[])
{
    new tele;
    if(sscanf(params, "f", tele)) SendClientMessage(playerid, RED, "USAGE: /tp id (use /teles for ID list).");
    else
    {
    if(tele == 1)
    {
        SetPlayerPos(playerid, 0, 0, 0);
     }
    if(tele == 2)
    {
        SetPlayerPos(playerid, 0, 0, 0);
    }
        }
    return 1;
}
I doesn't work. When I type /tp 1 nothing happens.
(if you think it doesn't do anything because of the cords, it's not because of that. Even if I change it to SendClientMessage nothing shows up.)


Re: Need help with teleporting system - spedico - 13.02.2011

I tried switch and it didn't work either. The problem is probably in the sscanf line. Any help? Never used sscanf before because I find it confusing.


Re: Need help with teleporting system - spedico - 13.02.2011

Fixed. I didn't know what did the second parameter for sscanf did. lol.