How to make space in zcmd?
#1

How to make space to the command in zcmd?
like for example:
pawn Код:
CMD:/goto area51(playerid, params[])
I tried with
pawn Код:
CMD:/goto_area51(playerid, params[])
but it doesnt work.

So how to add space at the cmd
Reply
#2

Just use strcmp to check the params and see if it is area51?
Reply
#3

You could do this but its definatly not the best way to go.
pawn Код:
CMD:goto(playerid, params[])
{
    if(!strcmp(params, "area51"))//if area 51 was typed after a space
    {
        //setpos
    }
    else if(!strcmp(params, "otherplace"))
    {
        //setpos
    }
    //more teleports
    else SendClientMessage(playerid, 0xff0000AA, "INVALID SELECTION");
    return 1;
}
Reply
#4

so i cant make it with space?
I should download ******'s y_cmd?
Reply
#5

You don't have to use a space. You have a "params" parameter which includes already the rest of your command. So actually you can do a check and SetPlayerPos according the index.
Reply
#6

So how should I do it?
Reply
#7

The way i posted will work for what you want.
Reply
#8

Okay thanks Iggy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)