SA-MP Forums Archive
How to make space in 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make space in zcmd? (/showthread.php?tid=236403)



How to make space in zcmd? - Max_Coldheart - 07.03.2011

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


Re: How to make space in zcmd? - [03]Garsino - 07.03.2011

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


Re: How to make space in zcmd? - iggy1 - 07.03.2011

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;
}



Re: How to make space in zcmd? - Max_Coldheart - 07.03.2011

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


Re: How to make space in zcmd? - RyDeR` - 07.03.2011

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.


Re: How to make space in zcmd? - Max_Coldheart - 07.03.2011

So how should I do it?


Re: How to make space in zcmd? - iggy1 - 07.03.2011

The way i posted will work for what you want.


Re: How to make space in zcmd? - Max_Coldheart - 07.03.2011

Okay thanks Iggy