Quote:
Originally Posted by pixl
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/factions", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_PINK," Factions :");
SendClientMessage(playerid, COLOR_BLUE," Police Department");
SendClientMessage(playerid, COLOR_BLACK," Federal Bureau of Investigation");
SendClientMessage(playerid, COLOR_GREEN," National Guard");
SendClientMessage(playerid, COLOR_RED," Medic");
SendClientMessage(playerid, COLOR_PINK," The Government");
SendClientMessage(playerid, COLOR_PINK," Secret Service");
SendClientMessage(playerid, COLOR_ORANGE," Hitman");
SendClientMessage(playerid, COLOR_LIGHTBLUE," SanFierroNews");
{
return 1;
}
return 0;
}
Anyone see anything wrong in here?
|
Yup, I see wrong
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/factions", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_PINK," Factions :");
SendClientMessage(playerid, COLOR_BLUE," Police Department");
SendClientMessage(playerid, COLOR_BLACK," Federal Bureau of Investigation");
SendClientMessage(playerid, COLOR_GREEN," National Guard");
SendClientMessage(playerid, COLOR_RED," Medic");
SendClientMessage(playerid, COLOR_PINK," The Government");
SendClientMessage(playerid, COLOR_PINK," Secret Service");
SendClientMessage(playerid, COLOR_ORANGE," Hitman");
SendClientMessage(playerid, COLOR_LIGHTBLUE," SanFierroNews");
{//WRONG BRACKET
return 1; //Return should come first
}
return 0;
}
FIX :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/factions", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_PINK," Factions :");
SendClientMessage(playerid, COLOR_BLUE," Police Department");
SendClientMessage(playerid, COLOR_BLACK," Federal Bureau of Investigation");
SendClientMessage(playerid, COLOR_GREEN," National Guard");
SendClientMessage(playerid, COLOR_RED," Medic");
SendClientMessage(playerid, COLOR_PINK," The Government");
SendClientMessage(playerid, COLOR_PINK," Secret Service");
SendClientMessage(playerid, COLOR_ORANGE," Hitman");
SendClientMessage(playerid, COLOR_LIGHTBLUE," SanFierroNews");
return 1;
}
return 0;
}