CMD:fchat(playerid, params[])
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_CORRECTION, "You're not logged in.");
if(!isnull(params))
{
new string[560];
if (PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pMember] > 0)
{
new member = PlayerInfo[playerid][pMember];
if(member==1)
{
if(PlayerInfo[playerid][pFaction] == 6) { format(string, sizeof(string), "{99B8F5}[FACTION] (( Commissary %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else if(PlayerInfo[playerid][pFaction] == 5) { format(string, sizeof(string), "(( SubCommissary %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else if(PlayerInfo[playerid][pFaction] == 4) { format(string, sizeof(string), "(( Mayor %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else if(PlayerInfo[playerid][pFaction] == 3) { format(string, sizeof(string), "(( SubMayor %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else if(PlayerInfo[playerid][pFaction] == 2) { format(string, sizeof(string), "(( Official %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else if(PlayerInfo[playerid][pFaction] == 1) { format(string, sizeof(string), "(( Cadet %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
else { format(string, sizeof(string), "(( Helper %s{FFFFFF}: %s {99B8F5}))", GetName(playerid), params); }
SendFamilyMessage(PlayerInfo[playerid][pMember], 0x7BDDA5AA, string);
}
return 1;
}
else SendClientMessage(playerid, COLOR_CORRECTION, "You're not in a faction !");
}
else SendClientMessage(playerid, COLOR_WHITE, "USAGE: /f [Text]");
return 1;
}
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2583) : error 017: undefined symbol "SendFamilyMessage" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2590) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Hey guys im tryint to implement a /fchat in my gm buy i got this problem cuz i dont know hot to define it correctly:
PHP код:
Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2583) : error 017: undefined symbol "SendFamilyMessage" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2590) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
Stop copying from other gamemodes without knowing what are the requirements of the system!! You need to loop through all players and see if any of them is in the same gang of the sender, and send him a message.
|
stock SendFamilyMessage(group, const colour, const string[]) { foreach(new i : Player) if(PlayerInfo[i][pGroup] == group) SendClientMessage(i, colour, string); return 1; }
Kick(playerid);
take this and put in the gamemode
Код:
stock SendFamilyMessage(group, const colour, const string[]) { foreach(new i : Player) if(PlayerInfo[i][pGroup] == group) SendClientMessage(i, colour, string); return 1; } |
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(353) : error 017: undefined symbol "pGroup" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(353) : error 035: argument type mismatch (argument 3) C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(351) : warning 203: symbol is never used: "string" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2635) : error 035: argument type mismatch (argument 3) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
Please add this to your gamemode
OnPlayerSpawn so you can fix your gamemode . Код:
Kick(playerid); |