/cb chat needed - 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)
+--- Thread: /cb chat needed (
/showthread.php?tid=286417)
/cb chat needed -
hydronic - 28.09.2011
I would like to do in chat rooms so that they appointed / cb ...... and that the player would type / cb 1 would be transferred into that room and that others would not see how this would naredul
Re: /cb chat needed -
Pharrel - 28.09.2011
pawn Код:
CMD:changeroom(playerid, params[])
{
new room;
if(sscanf(params,"i",room))
return SendClientMessage(playerid, -1, "Usage: /cb [room]");
else
{
//Send a message showing that he changes the room!
Room[playerid] = room;
}
}
CMD:cb(playerid, params[])
{
new text[128];
if(sscanf(params, "s",text))
return //Usage: bla bla bla
else
{
format(string,sizeof(string), "[Room %d]%s Says: %s",Room[playerid], PLAYERNAME, text);//you must get the player name or use a stock if you have...
for(new i=0; i<MAXPLAYERS; i++)
{
if(Room[i] == Room[playerid])
SendClientMessage(i, -1, string);
}
}
return 1;
}
Re: /cb chat needed -
hydronic - 29.09.2011
Quote:
Originally Posted by Pharrel
pawn Код:
CMD:changeroom(playerid, params[]) { new room; if(sscanf(params,"i",room)) return SendClientMessage(playerid, -1, "Usage: /cb [room]"); else { //Send a message showing that he changes the room! Room[playerid] = room; } }
CMD:cb(playerid, params[]) { new text[128]; if(sscanf(params, "s",text)) return //Usage: bla bla bla else { format(string,sizeof(string), "[Room %d]%s Says: %s",Room[playerid], PLAYERNAME, text);//you must get the player name or use a stock if you have... for(new i=0; i<MAXPLAYERS; i++) { if(Room[i] == Room[playerid]) SendClientMessage(i, -1, string); } } return 1; }
|
not working
Re: /cb chat needed -
hydronic - 29.09.2011
C:\Server\filterscripts\CB.pwn(29) : warning 203: symbol is never used: "cb"
C:\Server\filterscripts\CB.pwn(29) : warning 203: symbol is never used: "changeroom"
C:\Server\filterscripts\CB.pwn(29) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: /cb chat needed -
Jafet_Macario - 29.09.2011
Did you even
#include <zcmd>?
Re: /cb chat needed -
hydronic - 29.09.2011
i don.t anderstand sory
Re: /cb chat needed -
hydronic - 30.09.2011
i don.t know how to make cb canel... please help