[SQL] Changename command
#7

Quote:
Originally Posted by Mencent
Посмотреть сообщение
@eikzdej:
Try this:
PHP код:
CMD:g(playerid,params[])
{
    new 
string[145],nachricht[100],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    if(
sscanf(params,"s[100]",nachricht))return SendClientMessage(playerid,-1,"Usage: {00FF00}/g <text>");
    if(
gchat_timer[playerid] < gettime())
    {
        if(!
strlen(Player[playerid][Title]))
        {
            
gchat_timer[playerid] = gettime() + GCHAT_TIME;
            
format(string,sizeof string,"(( [%d] Level %d Player %s: %s ))",playerid,Player[playerid][Score],playername,nachricht);
            
SendClientMessageToAll(COLOR_ORANGE,string);
            return 
1;
        }
        else
        {
            
gchat_timer[playerid] = gettime() + GCHAT_TIME;
            
format(string,sizeof string,"(( [%d] %s %s: %s ))",playerid,Player[playerid][Title],playername,nachricht);
            
SendClientMessageToAll(COLOR_ORANGE,string);
            return 
1;
        }
    }
    else
    {
        
format(string,sizeof string,"You must wait %i seconds before speaking again in this channel.",gchat_timer[playerid] - gettime());
        
SendClientMessage(playerid,COLOR_GREY,string);
    }
    return 
1;

Thanks, but still show empty blank space, i don't know the code that checks if the row is empty or not. Maybe someone can help me?

And Also, i already add (!strlen(Player[playerid][Title])) but it does not read this line,

Quote:

format(string,sizeof string,"(( [%d] Level %d Player %s: %s ))",playerid,Player[playerid][Score],playername,nachricht);

Reply


Messages In This Thread
[SQL] Changename command - by eikzdej - 03.02.2016, 13:22
Re: [SQL] Changename command - by Gammix - 03.02.2016, 14:12
Re: [SQL] Changename command - by AbyssMorgan - 03.02.2016, 14:16
Re: [SQL] Changename command - by eikzdej - 03.02.2016, 14:23
Re: [SQL] Changename command - by Gammix - 03.02.2016, 14:26
Re: [SQL] Changename command - by Mencent - 03.02.2016, 16:32
Re: [SQL] Changename command - by eikzdej - 03.02.2016, 23:51
Re: [SQL] Changename command - by eikzdej - 04.02.2016, 03:20
Re: [SQL] Changename command - by eikzdej - 04.02.2016, 13:23
Re: [SQL] Changename command - by eikzdej - 04.02.2016, 14:36

Forum Jump:


Users browsing this thread: 1 Guest(s)