zcmd question
#1

hello, how can i make a command with spaces in zcmd

like COMMAND:tele liberty(playerid, params[])

that was just a random cmd, i need this for something else, but how can i make it
Reply
#2

Easy

pawn Код:
CMD:tele(playerid, params[])
{
    if ( !strcmp( params, "liberty"))
    {
        //liberty code
    }
    else if ( !strcmp( params, "lvair"))
    {
        //code
    }
    else if ( !strcmp( params, "lsair"))
    {
        //code
    }
    else SendClientMessage( playerid, -1, "USAGE: /tele <teleport>   | teleports = lvair lsair liberty");
    return 1;
}
That's why the params are there.
Reply
#3

Ok I see, but example how to make a command to get an item with spaces

like COMMAND:get licence(playerid, params[])

I just need to see it like you do with that
Reply
#4

pawn Код:
CMD:get(playerid, params[])
{
    if ( !strcmp( params, "license"))
    {
        //Your Code
    }
    else SendClientMessage( playerid, -1, "USAGE: /get <license>");
    return 1;
}
Easy as breathing
Reply
#5

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)