need some help
#1

Hey boys im tryin to add a fight command and it gives me some errors can u help me to fix them?

command
Quote:

if(strcmp(cmd, "/kungfu", true) == 0)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
SendClientMessage(playerid, red, ">> Fighting Style changed to 'Kung-Fu'");
return 1;
}

ERRORS
Код:
warning 217: loose indentation
: error 017: undefined symbol "cmd"
: warning 217: loose indentation
: error 017: undefined symbol "red"
: warning 217: loose indentation
Reply
#2


put this under
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];

Some update here , Colour Red Changed into Codes

Код:
  if(strcmp(cmd, "/kungfu", true) == 0)
{
      SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
    SendClientMessage(playerid,0xAA3333AA, ">> Fighting Style changed to 'Kung-Fu'");
    return 1;
  }
Reply
#3

pawn Код:
if(strcmp(cmdtext, "/kungfu", true) == 0)
  {
    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
    SendClientMessage(playerid, red, ">> Fighting Style changed to 'Kung-Fu'");
    return 1;
  }
And put this on top

pawn Код:
#define red      0xF60000AA
cmd => cmdtext
red => wasnt defined

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)