[HELP] Unkown Command finish -
Thedya - 18.11.2011
Код:
else
{
SendClientMessage(playerid, COLOR_RED, "Wrong place.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not a cop.");
return 1;
}
}//not connected
return 1;
}
//car system
new pos, funcname[32];
while(cmdtext[++pos] > ' ')
{
funcname[pos-1] = tolower(cmdtext[pos]);
}
strins(funcname, "cmd_", 0, sizeof(funcname));
while (cmdtext[pos] == ' ') pos++;
if(!cmdtext[pos])
{
return CallLocalFunction(funcname, "is", playerid, "\1");
}
return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);
//car system
}
guys this i my 'usercommandtext' finish line.
now at this position, how can i change 'Unknown Command' text to what i want ? i cant find 'return 0' for change to
Код:
return SendClientMessage(playerid,COLOR_BLUE,"Whoaa!! Wrong Command!! Try /cmds for some help.");
}
Re: [HELP] Unkown Command finish -
antonio112 - 18.11.2011
Replace the
from your function, with the desired message. Example:
pawn Код:
return SendClientMessage(playerid, -1, "Wrong command.");
Re: [HELP] Unkown Command finish -
Thedya - 18.11.2011
does not happen :/ i gotta crayz.
Код:
}
else
{
SendClientMessage(playerid, COLOR_RED, "you are not a cop.");
return 1;
}
}
return SendClientMessage(playerid, -1, "Wrong command.");
}
//car system
Re: [HELP] Unkown Command finish -
antonio112 - 18.11.2011
You must have something like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
Replace the last 'return' with:
pawn Код:
return SendClientMessage(playerid, -1, "This command does not exist in our database.");
or whatever you want the message.
Re: [HELP] Unkown Command finish -
Thedya - 18.11.2011
yep i understand but i dont have any 'return 0' under public onplayercommandtext. I send here my public's last line. and this is public start.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(specplayer, 10, cmdtext);
dcmd(specoff, 7, cmdtext);
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/dekor", true) == 0 || strcmp(cmd, "/dek", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new house = PlayerInfo[playerid][pPhousekey];
GetPlayerName(playerid, playername, sizeof(playername));
if (house != 999 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
public is 16.000 line.
Re: [HELP] Unkown Command finish -
antonio112 - 18.11.2011
Holy ... Well, still, look for the last return, right before the last closed bracket:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//bla bla bla 15999 lines here
return 1; // This is the return you need to change.
}
Or just copy your OnCommandText on pastebin and give me a link... I'll fix it for you.
Re: [HELP] Unkown Command finish -
Thedya - 18.11.2011
allright, im going to upload my usercommandtext, pastepin doesnt accept because of line limit.