CMD:c(playerid,params[])
{
new clanstring[128];
if(pInfo[playerid][pClan])
{
if(!strlen(params))
{
SCM(playerid, -1, ""VER" /C [Message]");
return 1;
}
format(clanstring, sizeof(clanstring), "(CLAN){32CD32} %s[%d] says: {FFFFFF}%s", PlayerName(playerid), playerid, params);
SendMessageToClan(clanstring, -1);
}
else {
SCM(playerid,-1,"*"RED" You do not have the right admin permissions for this command!");
}
return 1;
}
stock SendMessageToClan(message[], color)
{
foreach(Player, i)
{
if(pInfo[i][pClan])
{
SCM(i, color, message);
}
}
return 1;
}
stock SendMessageToClan(message[], color)
{
foreach(Player, i)
{
if(pInfo[i][pClan] == pInfo[playerid][pClan])
{
SCM(i, color, message);
}
}
return 1;
}
nгo sei se seria o correto mas:
pawn Код:
|
CMD:clanchat(playerid, params[])
{
new clanstring[128], texto[64];
for(new i, i < MAX_PLAYERS; i++)
{
if(sscanf(params, "s[64]", texto))return SendClientMessage(playerid, -1, "USO: /clanchat [TEXTO]");
if(pInfo[i][pClan] == CLan1)
{
format(clanstring, sizeof(clanstring), "(CLAN){32CD32} %s[%d] says: {FFFFFF}%s", PlayerName(playerid), playerid, texto);
SendClientMessage(i, -1, clanstring);
}
else if(pInfo[i][pClan] == CLan2)
{
format(clanstring, sizeof(clanstring), "(CLAN){32CD32} %s[%d] says: {FFFFFF}%s", PlayerName(playerid), playerid, texto);
SendClientMessage(i, -1, clanstring);
}
else if(pInfo[i][pClan] == CLan3)
{
format(clanstring, sizeof(clanstring), "(CLAN){32CD32} %s[%d] says: {FFFFFF}%s", PlayerName(playerid), playerid, texto);
SendClientMessage(i, -1, clanstring);
}
}
return 1;
}
pawn Код:
|
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\t-t.pwn(145) : error 021: symbol already defined: "i"
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\t-t.pwn(145) : warning 206: redundant test: constant expression is non-zero
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\t-t.pwn(145) : warning 203: symbol is never used: "i"
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\t-t.pwn(145 -- 183) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
stock SendMessageToClan(playerid, message[], color) { foreach(Player, i) { if(pInfo[i][pClan] == pInfo[playerid][pClan]) { SCM(i, color, message); } } return 1; }
mude o seu SendMessageToClan(message[], color)
por esse [...] Код:
stock SendMessageToClan(playerid, message[], color) { foreach(Player, i) { if(pInfo[i][pClan] == pInfo[playerid][pClan]) { SCM(i, color, message); } } return 1; } |
mude o seu SendMessageToClan(message[], color)
por esse [...] Код:
stock SendMessageToClan(playerid, message[], color) { foreach(Player, i) { if(pInfo[i][pClan] == pInfo[playerid][pClan]) { SCM(i, color, message); } } return 1; } |
C:\Users\Pгo Doce\Desktop\Mafia\gamemodes\t-t.pwn(153) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
SendMessageToClan(clanstring, -1);
SendMessageToClan(playerid, clanstring, -1);
PHP код:
Код:
SendMessageToClan(clanstring, -1); |
SendMessageToClan(playerid, clanstring, -1);