SA-MP Forums Archive
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)
+--- Thread: ZCMD... (/showthread.php?tid=531237)



ZCMD... - Baltimore - 11.08.2014

Hello!

I'm a new user in zcmd.

I have a cmd for teleport in pos x y z but it's not work, look:

pawn Код:
else if(!strcmp(param, "pos", true, 3))
    {
        new Float:x,
            Float:y,
            Float:z;
       
        if(sscanf(params, "fff", x, y, z))
        {
            return SendClientMessage(playerid, -1, "/tp pos <X Y Z> (Sans les virgules)");
        }
        SetPlayerPos(playerid, x, y, z);
        SetInterior(playerid, 0);
        SetVirtualWorld(playerid, 0);
       
        SendClientMessage(playerid, -1, "Vous venez d'кtre tйlйportй.");
    }
Thx


Re : ZCMD... - DarkZeroX - 11.08.2014

PHP код:
COMMAND:tp(playerid,params[])
{
    new 
tmp[40], auxParams[124];
    if(
sscanf(params"s[40]S()[124]"tmpauxParams))
    {
        return 
1;
    }
    if(
strcmp(tmp"pos"true)==0)
    {
            new 
Float:x
            
Float:y
            
Float:z;
        
            if(
sscanf(auxParams"fff"xyz))
            {
                 return 
SendClientMessage(playerid, -1"/tp pos <X Y Z> (Sans les virgules)");
            }
            
SetPlayerPos(playeridxyz);
            
SetInterior(playerid0);
            
SetVirtualWorld(playerid0);
            return 
1;
    }
    return 
1;