SA-MP Forums Archive
/setworld command - 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: /setworld command (/showthread.php?tid=530985)



/setworld command - Snail - 10.08.2014

Hi all!


Could somebody make me a '/setworld' command ?

/setworld <playerid> <worldid>

Thank you


Re: /setworld command - AMouldyLemon - 10.08.2014

pawn Код:
command(setworld, playerid, params[])
{
    if(// Admin code)
    {
        new id, world, string[256];
        if(sscanf(params, "ud", id, world)) return SendClientMessage(playerid, WHITE, "Server: /setworld [playerid/name] [world]");
        {
            SetPlayerVirtualWorld(id, world);
        }
    }
    else return SendClientMessage(playerid, -1, "Admin Only.");
    return 1;
}



Re: /setworld command - Snail - 10.08.2014

Quote:
Originally Posted by AMouldyLemon
Посмотреть сообщение
pawn Код:
command(setworld, playerid, params[])
{
    if(// Admin code)
    {
        new id, world, string[256];
        if(sscanf(params, "ud", id, world)) return SendClientMessage(playerid, WHITE, "Server: /setworld [playerid/name] [world]");
        {
            SetPlayerVirtualWorld(id, world);
        }
    }
    else return SendClientMessage(playerid, -1, "Admin Only.");
    return 1;
}
Im getting a warning:

pawn Код:
C:\Users\George\Desktop\SAMP Server\filterscripts\cmds.pwn(593) : warning 204: symbol is assigned a value that is never used: "string"



Re: /setworld command - JonathanW - 10.08.2014

String is used if you Send a formatted message. Remove new string


Re: /setworld command - Snail - 10.08.2014

Quote:
Originally Posted by JonathanW
Посмотреть сообщение
String is used if you Send a formatted message. Remove new string
Ah, thank you