04.01.2012, 03:33
on top
on player text
command
i might failed but still, just try it.
pawn Код:
new talkascodename[MAX_PLAYERS],codename[20],ifcodename[MAX_PLAYERS],str[128];
pawn Код:
public OnPlayerText(playerid, text[])
{
if(ifcodename[playerid] == 1)
{
return 0;
format(str,sizeof(str),"%s: %s",talkascodename,text);
SendClientMessageToAll(-1,str);
}
return 1;
}
pawn Код:
CMD:codename(playerid,params[])
{
if(sscanf(params,"s",codename)) return SendClientMessage(playerid,grey,"USAGE: /codename [name]");
if(ifcodename[playerid] == 0)
{
ifcodename[playerid] = 1;
talkascodename[playerid] = codename;
}
else if(ifcodename[playerid] == 1)
{
ifcodename[playerid] = 0;
}
return 1;
}