29.06.2016, 04:35
I made this command >
But, I found this Error >
Please Help Me
PHP код:
CMD:osetlevel(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new file[256];
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /osetlevel [name] [level]");
if(isnull(tmp2)) return SendClientMessage(playerid, red, "ERROR: You must give a reason");
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(tmp));
if(!fexist(file)) return SendClientMessage(playerid, red, "ERROR: that account don't even exist!");
dini_Set(file,"level",tmp2);
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
format(ystring,sizeof(ystring),"You have set %s's level to %s on %d/%d/%d at %d:%d:%d",tmp,tmp2 ,day, month, year, hour, minute, second );
return SendClientMessage(playerid,blue,ystring);
} else return SendClientMessage(playerid,red,"ERROR: Player must be registered to be admin");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
Код:
D:\Data\Filbert\SA-MP Server\SGTDM~RP\Gamemodes\SGTDM~RP.pwn(31333) : error 010: invalid function or declaration D:\Data\Filbert\SA-MP Server\SGTDM~RP\Gamemodes\SGTDM~RP.pwn(31334) : error 010: invalid function or declaration