30.07.2010, 22:50
//----------------------------------[Gang Ballas e Vagos]-----------------------------------------------
if(strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 18, 19 || PlayerInfo[playerid][pLider] == 18, 19)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ang [texto]");
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "||Anuncio de Gangs||");
format(string, sizeof(string), "Gangster %s: %s", sendername, result);
SendClientMessageToAll(0xFFFFFFFF, string);
}
}
return 1;
}
------------------------------------------------------------------------
This is my GM. I have a big problem now, i want to do the adds code for gangs. I want to put the code /ang for all the anounce gang messages but i cant do it. this is the error:
(
if(PlayerInfo[playerid][pMembro] == 18, 19 || PlayerInfo[playerid][pLider] == 18, 19))
How i put this for 2 or more gangs
Note: I try already copy this and change 1 to 18 and teh other to 19
if(strcmp(cmd, "/anunciogang", true) == 0 || strcmp(cmd, "/ang", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMembro] == 18, 19 || PlayerInfo[playerid][pLider] == 18, 19)
{
if(PlayerInfo[playerid][pCargo] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "Voce precisa ter pelo menos cargo 4 para usar este comando!!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ang [texto]");
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "||Anuncio de Gangs||");
format(string, sizeof(string), "Gangster %s: %s", sendername, result);
SendClientMessageToAll(0xFFFFFFFF, string);
}
}
return 1;
}
------------------------------------------------------------------------
This is my GM. I have a big problem now, i want to do the adds code for gangs. I want to put the code /ang for all the anounce gang messages but i cant do it. this is the error:
(
if(PlayerInfo[playerid][pMembro] == 18, 19 || PlayerInfo[playerid][pLider] == 18, 19))
How i put this for 2 or more gangs
Note: I try already copy this and change 1 to 18 and teh other to 19