SA-MP Forums Archive
Goto command with sscanf, zcmd - 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: Goto command with sscanf, zcmd (/showthread.php?tid=205153)



Goto command with sscanf, zcmd - PlayerID - 31.12.2010

Hey can anyones tell me how to create /goto command with sscanf and zcmd?


Re: Goto command with sscanf, zcmd - HyperZ - 31.12.2010

You need these things.
Sscanf2
Zcmd

lol here's cmd i've created for u.
pawn Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

command(goto, playerid, params[])
{
    new ID;
    if(sscanf(params, "u", ID)) SendClientMessage(playerid, 0xF97804FF, "USAGE: /goto [id]");
    else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, 0xF97804FF, "Player is not connected!");
    else
    {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(ID, x, y, z);
    SetPlayerPos(playerid, x+1, y+1, z);
    }
    return 1;
}
Wiki Fast Commands with sscanf


Re: Goto command with sscanf, zcmd - PlayerID - 31.12.2010

Thnx you are the best.


Re: Goto command with sscanf, zcmd - HyperZ - 31.12.2010

Quote:
Originally Posted by hyperz
View Post
Thnx you are the best.
Lol, You're welcome mate.


Re : Goto command with sscanf, zcmd - timaoux - 30.07.2011

C:\Users\maxime\Desktop\cmdclan.pwn(97) : error 017: undefined symbol "command"
C:\Users\maxime\Desktop\cmdclan.pwn(97) : error 029: invalid expression, assumed zero
C:\Users\maxime\Desktop\cmdclan.pwn(100) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


Re: Re : Goto command with sscanf, zcmd - Kush - 30.07.2011

Quote:
Originally Posted by timaoux
View Post
C:\Users\maxime\Desktop\cmdclan.pwn(97) : error 017: undefined symbol "command"
C:\Users\maxime\Desktop\cmdclan.pwn(97) : error 029: invalid expression, assumed zero
C:\Users\maxime\Desktop\cmdclan.pwn(100) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
PHP Code:
CMD:goto(playeridparams[])
{
     if(
IsPlayerAdmin(playerid))
     {
        new 
ID;
        new 
Str[64];
        if(
sscanf(params"u"ID)) SendClientMessage(playeridCOLOR_GREY"USAGE: /goto [playerid]");
        else if(
IsPlayerConnected(ID) == 0SendClientMessage(playeridCOLOR_GREY"Player is not connected!");
        else
        {
            new 
Float:xFloat:yFloat:z;
            
GetPlayerPos(IDxyz);
            
SetPlayerPos(playeridx+1y+1z);
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GREY"You are not authorized to use that command!");
    }
    return 
1;