how to convert into zcmd
#3

or could use ZCMD & sscanf ?

first few lines:

PHP код:
CMD:colocar( playerid, params[ ] )
        {
                if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "*You must be in a vehicle.");
                new 
lightColor,neonColor;
                if ( 
sscanf( params, "ss", lightColor,neonColor ) ) return SendClientMessage( playerid, COLOR_RED, "Usage: /place [light-neon] [color]" );
                
SendClientMessage(playerid, COLOR_GREY, "Light color: blue - green - white - red - random.");
                
SendClientMessage(playerid, COLOR_GREY, "Neon colors: yellow - pink - blue - green - white - red - random.");
} 
see where "ss" is on the 5th line of my code if u didnt no what the letters are:

c - A character.
d, i - An integer.
h, x - A hex number (e.g. a colour).
f - A float.
s - A string.
z - An optional string.
pX - An additional delimiter where X is another character.
'' - Encloses a litteral string to locate.
u - User, takes a name, part of a name or an id and returns the id if they're connected.

you just put the letter which refers to the variable your storing the response in if theres two variables 1,2 then u need two letter in the "" if theres 4 variables 1,2,3,4 then you would need 4 letters "iiii"
Reply


Messages In This Thread
how to convert into zcmd - by Danyal - 07.12.2011, 18:17
Re: how to convert into zcmd - by WLSF - 07.12.2011, 18:30
Re: how to convert into zcmd - by English-Conceptz - 07.12.2011, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)