Clan chat prob -
killing - 31.07.2014
i am making clan chat for my server
Код:
CMD:cc(playerid, params[])
{
if(PlayerInfo[playerid][prm] >= 1)
{
format(fstr, sizeof(fstr), "[CLAN-CHAT]: %s: %s", GetName(playerid), params);
foreach(Player, i)
{
if(PlayerInfo[i][rm] >= 1 || IsPlayerrm(i))
{
SendClientMessage(i, YELLOW, fstr);
}
}
}
else if(PlayerInfo[playerid][rm] >= 1)
{
format(fstr, sizeof(fstr), "[CLAN-CHAT]: %s: %s", GetName(playerid), params);
foreach(Player, i)
{
if(PlayerInfo[i][rm] >= 1)
{
SendClientMessage(i, YELLOW, fstr);
}
}
}
else
{
SendClientMessage(playerid, RED, "Only clan members can use this command.");
}
return true;
}
Error
Код:
D:\TDm 2.0\ilkul new wala\gamemodes\NVCNR2.pwn(25800) : error 017: undefined symbol "IsPlayerrm"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
i have copied my admin chat code and edit it like Isplayeradmin so Isplayerrm [ rm = ruskaya mafia clan name ]
Admin chat code
Код:
CMD:a(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
format(fstr, sizeof(fstr), "[ADMIN-CHAT]: %s: %s", GetName(playerid), params);
foreach(Player, i)
{
if(PlayerInfo[i][aLevel] >= 1 || IsPlayerAdmin(i))
{
SendClientMessage(i, ORANGE, fstr);
}
}
}
else if(PlayerInfo[playerid][aLevel] >= 1)
{
format(fstr, sizeof(fstr), "[ADMIN-CHAT]: %s: %s", GetName(playerid), params);
foreach(Player, i)
{
if(PlayerInfo[i][aLevel] >= 1)
{
SendClientMessage(i, ORANGE, fstr);
}
}
}
else
{
SendClientMessage(playerid, RED, "Only admin level 1+ can use this command.");
}
return true;
}
Re: Clan chat prob -
Clad - 31.07.2014
pawn Код:
stock IsPlayerrm(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][prm] >= 1) return 1;
return 0;
}
Add this below the command
I'll tell you what you was doing wrong.
In your cmd "a" you could find this
pawn Код:
if(IsPlayerAdmin(playerid))
because it was already defined, Which means everyone who is higher admin than level 1. Ex: 2 - 3 .. 999999.
You can in your GameMode search for it and you will find it.
So you must do the same thing so your code works, And the code I gave you is what you need.
Re: Clan chat prob -
killing - 31.07.2014
ya done ty and pls can u gv me code when some one clan chat it plays sound to like
/cc Hi dude
when he types this all clan members can hear 1 sec sound
Re: Clan chat prob -
Clad - 31.07.2014
You mean sound ding ?
pawn Код:
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
Re: Clan chat prob -
killing - 31.07.2014
okey

ty added repu
Re: Clan chat prob -
killing - 31.07.2014
bro where can i get all ids for sound ?
Re: Clan chat prob -
Clad - 31.07.2014
https://sampwiki.blast.hk/wiki/SoundID
Re: Clan chat prob -
killing - 31.07.2014
Can u gv me code 3d text on heads of clan members
Re: Clan chat prob -
Clad - 31.07.2014
pawn Код:
new Text3D:ClanLabel[MAX_PLAYERS];
To create it use this
pawn Код:
ClanLabel[playerid] = Create3DTextLabel("Clan Member",0x00AA0099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(ClanLabel[playerid], playerid, 0,0,0);
To remove it use this
pawn Код:
Delete3DTextLabel(ClanLabel[playerid]);
Re: Clan chat prob -
killing - 31.07.2014
is this possible ? Clan members should spawn on clan hq ? if yes so please give me code

i will be verythank full to u i will add coords by ma self

just need code