[Ajuda] sscanf
#5

Quote:
Originally Posted by Derritee1001
Посмотреть сообщение
Acho que й assim, pelo oq eu entendi

pawn Код:
CMD:escolher(playerid, params[])
{

     if (isnull(params))
    {
        SendClientMessage(playerid, -1, "USE: /escolher [opзгo]");
        SendClientMessage(playerid, COLOR_GREEN, "Opзхes: {FFFFFF}spawn, emprego");
        return 1;
    }

    if (!strcmp(params, "spawn", true))
    {
          // FUNЗХES AQUI
    }

    if (!strcmp(params, "emprego", true))
   {
               // FUNЗХES AQUI
    }
    return 1;
}
OBS: sу vocк indentar o cуdigo, caso precise.

REP + se te ajudei.
Verificou se o parвmetro й nulo, sendo que o cara nгo pediu isso e ainda pediu REP... "Hello World"

use:
Код:
if(sscanf(params, "ESPECIFICADOR", VARIAVEL)) return SendClientMessage(playerid, -1, "Parвmetro correto.");
Os especificadores sгo os seguintes:
Код:
Specifier(s)			Name				Example values
	i, d			Integer				1, 42, -10
	c			Character			a, o, *
	l			Logical				true, false
	b			Binary				01001, 0b1100
	h, x			Hex				1A, 0x23
	o			Octal				045 12
	n			Number				42, 0b010, 0xAC, 045
	f			Float				0.7, -99.5
	g			IEEE Float			0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
	u			User name/id (bots and players)	******, 0
	q			Bot name/id			ShopBot, 27
	r			Player name/id			******, 42
Reply


Messages In This Thread
sscanf - by GustavoVader - 26.04.2016, 14:28
Re: sscanf - by Derritee1001 - 26.04.2016, 14:39
Re: sscanf - by GustavoVader - 26.04.2016, 14:55
Re: sscanf - by Derritee1001 - 26.04.2016, 15:10
Re: sscanf - by F1N4L - 26.04.2016, 16:33
Re: sscanf - by Artista - 26.04.2016, 16:44
Re: sscanf - by GustavoVader - 26.04.2016, 17:02
Re: sscanf - by F1N4L - 26.04.2016, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)