GameText
#3

here you go


PHP код:
if(strcmp(cmd"/cnnn"true) == 0
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] >= 4)
            {
                
tmp strtok(cmdtextidx);
                new 
txtid;
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /cnnn <type> [cnnc textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
                    return 
1;
                }
                
txtid strval(tmp);
                if(
txtid == 2)
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"You can not select 2");
                    return 
1;
                }
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[128];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /cnnn <type> [cnnc textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
                    return 
1;
                }
                
format(stringsizeof(string), "[ADMIN]: %s Has CNNN'd [%s]."sendername result);
                
ABroadCast(COLOR_LIGHTRED,string5);
                
format(string,sizeof(string),"%s",(result));
                
GameTextForAll(string,5000,txtid);
                new 
ymd;
                new 
h,mi,s;
                
getdate(y,m,d);
                
gettime(h,mi,s);
                
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has CNNN'd: [%s]",d,m,y,h,mi,s,sendername,result);
                
AnnounceLog(string);
                return 
1;
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   you are not authorized to use that command!");
                return 
1;
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
GameText - by Ugaustin - 12.02.2016, 17:35
Re: GameText - by Chilli9434 - 12.02.2016, 17:40
Re: GameText - by Ugaustin - 12.02.2016, 17:42
Re: GameText - by Ugaustin - 12.02.2016, 19:52
Re: GameText - by Rukka - 12.02.2016, 23:20
Re: GameText - by Ugaustin - 13.02.2016, 01:20
Re: GameText - by Adeon - 13.02.2016, 14:47
Re: GameText - by Ugaustin - 13.02.2016, 17:37
Re: GameText - by Joron - 13.02.2016, 18:09
Re: GameText - by Adeon - 13.02.2016, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)