dmcd sscanf comand problem
#1

I want to creat and chat for medics and i used this

Код:
dcmd_r(playerid, params[])
{
    if(strcmp(factiune[playerid],"Medic",true) == 0)
		{
		    new text[128];
		    if(sscanf(params,"s", text)) return SendClientMessage(playerid, 0xFFFFFFF,"Comanda gresita. Corect: /r text pentru a transmite ceva colegilor de factiune");
            new strr[128];
		    
			for (new i = 1; i <= MAX_PLAYERS; i++)
		        {
		            new medicnume[128];
		            GetPlayerName(i, medicnume, sizeof(medicnume));
		            if (strcmp(factiune[i],"Medic",true) == 0)
		                {
							format(strr,sizeof(strr),"Mesaj: \"%s\".",text);
		                    SendClientMessage(i, 0xFF00FFFF , strr);
		                }
		        }
		}
	else
	    {
	        SendClientMessage(playerid, 0xFF00FFFF , "Nu esti Medic sau Politist.");
	    }
    return 1;
}
and on OnPlayerCommandText i have

Код:
dcmd(r, 1, cmdtext);
when i write in game
Код:
/r text
the server say me that my comand don't exist and in log appear that
Код:
sscanf warning: Strings without a length are deprecated, please add a destination size.
if i write
Код:
/r
they say me that
Код:
Comanda gresita. Corect: /r text pentru a transmite ceva colegilor de factiune
How i can repair this?

+1rec for good respons
Reply


Messages In This Thread
dmcd sscanf comand problem - by moof2010 - 29.11.2013, 13:05
Re: dmcd sscanf comand problem - by Konstantinos - 29.11.2013, 13:24
Re: dmcd sscanf comand problem - by moof2010 - 29.11.2013, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)