/setworld command
#1

Hi all!


Could somebody make me a '/setworld' command ?

/setworld <playerid> <worldid>

Thank you
Reply
#2

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;
}
Reply
#3

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"
Reply
#4

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)