/codename
#2

on top
pawn Код:
new talkascodename[MAX_PLAYERS],codename[20],ifcodename[MAX_PLAYERS],str[128];
on player text
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(ifcodename[playerid] == 1)
    {
         return 0;
         format(str,sizeof(str),"%s: %s",talkascodename,text);
         SendClientMessageToAll(-1,str);
    }
    return 1;
}
command
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;
}
i might failed but still, just try it.
Reply


Messages In This Thread
/codename - by Movado - 04.01.2012, 02:39
Re: /codename - by Tanush123 - 04.01.2012, 03:33
Re: /codename - by Ballu Miaa - 04.01.2012, 03:39
Re: /codename - by Movado - 04.01.2012, 03:39
Re: /codename - by Ballu Miaa - 04.01.2012, 03:41
Re: /codename - by Tanush123 - 04.01.2012, 03:42
Re: /codename - by Ballu Miaa - 04.01.2012, 03:47
Re: /codename - by Movado - 04.01.2012, 03:49
Re: /codename - by Ballu Miaa - 04.01.2012, 03:49
Re: /codename - by Movado - 04.01.2012, 03:51

Forum Jump:


Users browsing this thread: 1 Guest(s)