27.09.2018, 20:52
PHP код:
CMD:setfreq(playerid,params[])
{
if(PlayerHasItem(playerid,"Statie Radio"))
{
new slot, valoare ,string[128];
if(sscanf(params, "i", slot, value)) return SendClientMessage(playerid,-1,""COL_RED"Cmds: /setfreq [Slot] [Freq]");
switch(slot)
{
case 1: pInfo[playerid][pRadioFreq1] = value;
case 2: pInfo[playerid][pRadioFreq2] = value;
case 3: pInfo[playerid][pRadioFreq3] = value;
}
format(string,sizeof(string),""COL_RED"Cmds: You have changed slot number %i frequency at %i.",slot, value);
SendClientMessage(playerid,-1,string);
}
else {
SendClientMessage(playerid,-1,""COL_RED"ERROR: Where's your radio?");
}
- At server log it shows "sscanf warning: Format specifier does not match parameter count."
- When I type /setfreq, any of pRadioFreq won't change. It remains at 0