03.08.2012, 14:11
I solved all errors and warnings, but, when I use any command, It pulling Server: Unknown command. Any help ?
And sorry for bad English
And sorry for bad English
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
YCMD:report(playerid, params[], help)
{
#pragma unused help
new string[128], text[48];
if(sscanf(params, "s[48]", text)) return SCM(playerid, COLOR_RED, "Koriљtenje: /report [Text]");
foreach(Player, i) {
if(P_Data[i][pAdmin] > 0) {
format(string,sizeof(string),""COL_BLUE"[REPORT] Igrač %s: "COL_WHITE"%s ",GetName(playerid),text);
SCM(i,-1,string);
AskLog(playerid,text);} }
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;//use ths to make the script think that your command worked even if you don't have any commands
}
//then use this to set whatever message you want to send if they whrite wrong message
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
if(success == 0) return SendClientMessage(playerid, COLOR_GRAY2, "SERVER: Unknown command, use /help for further help.");//this is my command, but feel free to edit it as you want :)
}