[SQL] Changename command
#4

Thank you both of you! Now I have another problem in my /g command

Here's my script

Quote:

CMD:g(playerid, params[])
{
new s_gchat[145], gchat[145], t_gchat[145], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));

if (sscanf(params, "s[145]", gchat)) return SendClientMessage(playerid, -1, "{FFFFFF}Usage: {00FF00}/g <text>");
if (gchat_timer[playerid] < gettime())
{
if (!Player[playerid][Title])
{
gchat_timer[playerid] = gettime() + GCHAT_TIME;
format(s_gchat, sizeof(s_gchat), "(( [%d] Level %d Player %s: %s ))", GetPlayerIdFromName(playername), Player[playerid][Score], GetName2(playerid), gchat);
SendClientMessageToAll(COLOR_ORANGE, s_gchat);
return 1;
}
else
{
gchat_timer[playerid] = gettime() + GCHAT_TIME;
format(s_gchat, sizeof(s_gchat), "(( [%d] %s %s: %s ))", GetPlayerIdFromName(playername), Player[playerid][Title], GetName2(playerid), gchat);
SendClientMessageToAll(COLOR_ORANGE, s_gchat);
return 1;
}
}
else
{
format(t_gchat, sizeof(t_gchat), "You must wait %i seconds before speaking again in this channel.", gchat_timer[playerid] - gettime());
SendClientMessage(playerid, COLOR_GREY, t_gchat);
return 1;
}
}

I have my title system in my server, now when i try to add title in my character, it will show like this

Quote:

(([0] Test_Name: Hello))

instead of this
Quote:

(([0] Title Test Name: Hello))

And my problem is if the Title Row is empty, its shows blank space instead to this

Quote:

(([0] Level 1 Player Test Name: Hello))

Is there wrong with my script? Thanks!
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: 2 Guest(s)