20.05.2013, 00:49
Hello friends, I was creating the command to accept, but for reasons, I had warning of it if any could guide me remove these warnings are thanked, I attached the code
Thanks!
PHP код:
CMD:accept(playerid, params[])
{
new string[128];
if(IsPlayerConnected(playerid))
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "Usage: /accept [name]");
SendClientMessage(playerid, COLOR_GREY, "Options: faction");
return 1;
}
else if(strcmp(params,"faction",true) == 0)
{
if(InviteOffer[playerid] < 999)
{
if(IsPlayerConnected(InviteOffer[playerid]))
{
if(InviteFaction[playerid] == 0)
{
/*if(PlayerInfo[playerid][pJailTime] > 1)
{
SendClientMessage(playerid, COLOR_WHITE, "No puedes ser invitado estando en prisiуn.");
return 1;
}*/
if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "No puedes aceptar esta invitaciуn, porque ya estбs en una familia/facciуn.");
}
else
{
PlayerInfo[playerid][pFaction] = InviteFaction[playerid];
PlayerInfo[playerid][pRank] = 0;
PlayerInfo[playerid][pDivision] = 0;
PlayerInfo[playerid][pMember] = 0;
format(string, sizeof(string), "%s has accepted %s's invite to join the %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(InviteOffer[playerid]), GetFactionName(InviteFaction[playerid]));
format(string, sizeof(string), " You have accepted the invitation and joined the %s, you were invited by %s.", GetFactionName(InviteFaction[playerid]), GetPlayerNameEx(InviteOffer[playerid]));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s has accepted the invitation and joined the %s.", GetPlayerNameEx(playerid), GetFactionName(InviteFaction[playerid]));
SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, string);
InviteOffer[playerid] = 999;
InviteFaction[playerid] = 0;
}
}
}
}
else {
SendClientMessage(playerid, COLOR_GREY, " No one has invited you to join an organisation/family!");//3055
return 1;//3056
}//3057
}//3058
}//3059
return 1;//3060
}//3061
Quote:
C:\Users\sk\Desktop\x\gamemodes\x.pwn(3054) : warning 217: loose indentation C:\Users\sk\Desktop\x\gamemodes\x.pwn(3060) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings. |