Well, you have several errors that I could correct them. Why not try to use this cmd?
[pawn]else if ( strcmp( cmd, "!protect", true ) == 0 )
{
new dinero,Float:armour;dinero = GetPlayerMoney(playerid),Float:armour = GetPlayerArmour(playerid,armour);
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( armour >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "> Error: you have armor 100%." );
else if(dinero < 500) SendClientMessage(playerid,COLOR_GREEN,"Need $ 10 for your protection");
else
{
if(dinero >= 500) {
SetPlayerArmour(playerid, 100.0);
DecPlayerHandCash(playerid, 500);
SendClientMessage( playerid, COLOR_GREEN, "Your armor is now at 100%." );
}
}
return 1;
}[/pawn]
Ok, I'll tell you had your error in your cmd.
[pawn]else if ( strcmp( cmd, "!protect", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
new Float:armour; GetPlayerArmour(playerid,armour);
if ( armour >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "> Error: you have armor 100%." );
else
{
if(CheckMoney(playerid, 500);//here in an "if" never going this symbol ";"
{
SetPlayerArmour(playerid, 100);
DecPlayerHandCash(playerid, 500);
SendClientMessage( playerid, COLOR_GREEN, "Your armor is now at 100%." );
}//The other problem was that you needed to use another "arm", or as you call it, like this "}"
}//to make it so ...
return 1;
}[/pawn]
I hope you served. Sorry for my "bad English"