30.06.2011, 01:36
Hey. In the future when you're posting codes, I suggest using DracoBlue's TidyPawn which will 'tidy' up your code to make it much easier to read. It's a very useful and free online tool. You should also check this tutorial out, because it seems you don't know how the function strcmp works. Enjoy.
The error is occuring most likely because you're placing your command code outside of the public function, in your case: OnPlayerCommandText should be the public function that your command should be placed in. Below is an example of how it should be placed.
The error is occuring most likely because you're placing your command code outside of the public function, in your case: OnPlayerCommandText should be the public function that your command should be placed in. Below is an example of how it should be placed.
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
if( !strcmp( cmdtext, "/armoury", true ) )
{
// Code ...
return true;
}
return false;
}
public OnPlayerDeath( playerid, killerid, reason )
{
// Code
return true;
}