OnPlayerCommand Text Problems [2] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerCommand Text Problems [2] (
/showthread.php?tid=73609)
OnPlayerCommand Text Problems [2] -
nickbugun - 16.04.2009
If I make more then 2
if(strcmp(cmdtext, "/help", true) == 0) these errors come:
Код:
save2.pwn(373) : error 010: invalid function or declaration
save2.pwn(387) : error 010: invalid function or declaration
Re: OnPlayerCommand Text Problems [2] -
Rks25 - 16.04.2009
Show whole code.
Re: OnPlayerCommand Text Problems [2] -
nickbugun - 16.04.2009
The problem comes when i do the /about code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(login,5,cmdtext);
dcmd(register,8,cmdtext);
if(strcmp(cmdtext, "/help carshop", true) == 0)
{
if(IsAtCarshop(playerid, 0))
{
SendClientMessage(playerid,blue,"[!] Find a Car Dealer, and see what vehicles he has for sale.");
}
else
{
SendClientMessage(playerid,blue,"[!] You must be at the CarShop to use this command!");
}
return 1;
}
if(strcmp(cmdtext, "/help", true) == 0)
{
SendClientMessage(playerid,LIGHTGREEN,"--------------------------------------------------------");
SendClientMessage(playerid,LIGHTGREEN,"Type '/help' to bring up this help menu.");
SendClientMessage(playerid,LIGHTGREEN,"--------------------------------------------------------");
}
return 1;
}
//if(strcmp(cmdtext, "/about", true) == 0)
// {
// SendClientMessage(playerid,ADMINRED,"--------------------------------------------------------");
// SendClientMessage(playerid,ADMINRED,"About EviL Role Play");
// SendClientMessage(playerid,ADMINRED,"==");
SendClientMessage(playerid,ADMINRED,"--------------------------------------------------------");
// }
// return 1;
// }
Re: OnPlayerCommand Text Problems [2] -
Rks25 - 16.04.2009
At /help and /about you got a } to much (before the return).
Re: OnPlayerCommand Text Problems [2] -
Rks25 - 17.04.2009
@nickbugun. Could not pm you, exceeded limit of 5.
try this.
http://solidfiles.com/d/YTH5
This gives me 0 errors/warnings. So it should do for you too. And btw, if not, than try to update your includes.
Re: OnPlayerCommand Text Problems [2] -
nickbugun - 17.04.2009
may i?
<3 <3 <3 <3 TNX!!!!
Re: OnPlayerCommand Text Problems [2] -
Rks25 - 17.04.2009
Your welcome.