IRC cmd... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IRC cmd... (
/showthread.php?tid=74007)
IRC cmd... -
introzen - 19.04.2009
Hey, I tried to make a /irc command but when i write anything it spams the chat with the irc message...
pawn Код:
dcmd_irc(playerid,params[])
{
new pName[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"IRC: %s [%d]: %s",pName,playerid,params[0]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i,COLOR_BLUEMEDIUM,string);
}
SendClientMessage(playerid,COLOR_BLUEMEDIUM,string);
}
return 1;
}
thanks
Re: IRC cmd... -
Rks25 - 19.04.2009
Try:
pawn Код:
dcmd_irc(playerid,params[])
{
new pName[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"IRC: %s [%d]: %s",pName,playerid,params[0]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i,COLOR_BLUEMEDIUM,string);
}
}
SendClientMessage(playerid,COLOR_BLUEMEDIUM,string);
return 1;
}
Re: IRC cmd... -
introzen - 19.04.2009
ye that worked xD thx
Re: IRC cmd... -
Rks25 - 19.04.2009
Ur welcome.