PDA

View Full Version : What the hell? SendClientMessage bug.. how to fix this??


ChristianIvann09
16/03/2014, 10:50 AM
So i have the Admin Help

CMD:ah(playerid, params[]) { //=====Admin help===========
if(CheckGMX(playerid)) return 1;
if(PlayerInfo[playerid][pAdmin] >= 1) {
SendClientMessage(playerid, COLOR_GREEN,"__________________________________________________ _____________");
SendClientMessage(playerid, COLOR_GRAD1, "*** Server Moderator *** /admins /check /jail /kick /skick /aduty /showflags /nrn /namechanges /reports /ar /tr /post /nro /nao /rtnc /norevive");

if(PlayerInfo[playerid][pAdmin] >= 2) {
SendClientMessage(playerid, COLOR_GRAD1,"*** Junior Admin *** /spec /freeze /unfreeze /gethere /gotoid /gotoplayerscar /setvw /setint /oldcar /gotocar /entercar /jetpack /paused");
SendClientMessage(playerid, COLOR_GRAD1,"*** Junior Admin *** /afk /gotoco /(o)flag /(o)clearflag /ban /sban /hhcheck /slap /listguns /warn /(o)kills /(o)ipcheck /ip /goto /mark /mark2");
SendClientMessage(playerid, COLOR_GRAD1,"*** Junior Admin *** /watch /hospital /prisoners /sendtols /nmute /nunmute /admute /adunmute /anetstats /serial /approvename /denyname /bigears /setskin ");
}
if(PlayerInfo[playerid][pAdmin] >= 3) {
SendClientMessage(playerid, COLOR_GRAD2,"*** Senior Admin *** /prison /fine /pfine /takeadminweapons /takeweapons /release /force(death/hospital) /rto /rtoreset /mole /revive");
SendClientMessage(playerid, COLOR_GRAD2,"*** Senior Admin *** /reloadpvehicles /apark /aimpound /nonewbie /owarn /ocheck /ofine /oprison /respawncar(s) /deletead /atip");
SendClientMessage(playerid, COLOR_GRAD2,"*** Senior Admin *** /noooc /gcto /gcreset /switchfam /switchfac /respawnfreegangvehs /givemoney /setmoney (House CMDS: /hedit /hnext /hname) /cc ");
SendClientMessage(playerid, COLOR_GRAD2,"*** Senior Admin *** /dd(edit/next/near/name/pass) /goindoor /gotodoor /asellhouse /givenos /givegun /blowup /(goto/goin)house /veh /vehname /fixveh");
SendClientMessage(playerid, COLOR_GRAD2,"*** Senior Admin *** /destroycar /destroycars /oban /infotoall /goldrims /cutterrims /gr /cr");
}
if(PlayerInfo[playerid][pAdmin] >= 4) {
SendClientMessage(playerid, COLOR_GRAD3,"*** Head Admin *** /setname /forcesave /cnn /sethp /setarmor /setarmorall /pointfix /givelicense /fackick /destroypvehicle /createpvehicle ");
SendClientMessage(playerid, COLOR_GRAD3,"*** Head Admin *** /adivorce /eventhelp /sprison /unban /unbanip /setinsurance /fcreate /fdelete /fedit /creategvehicle /destroygvehicle ");
SendClientMessage(playerid, COLOR_GRAD3,"*** Head Admin *** /setmyname /createpvehicle /setfightingstyle /deletehit /countdown /refund /clearall /listtoys /leaders /setstat /skiptut ");
SendClientMessage(playerid, COLOR_GRAD3,"*** Head Admin *** /makeleader /sethelper");
}
if(PlayerInfo[playerid][pAdmin] >= 5) {
SendClientMessage(playerid, COLOR_GRAD4,"*** Server Co Owner *** /pedit /permaban /setcolor /paycheck /clearallreports /makeleader /changeuserpassword /setdonator");
SendClientMessage(playerid, COLOR_GRAD4,"*** Server Co Owner *** /amotd /restartserver /rmute /setadminname /fixvehall /cnnn /dedit /makeadmin /announce");
}
if(PlayerInfo[playerid][pAdmin] >= 6) {
SendClientMessage(playerid, COLOR_GRAD5,"*** Server Owner *** /makeadmin /motd /edit /dmp(edit/next/near) /listfacpay /facpay /gotodmp /createdealership /destroydealership");
SendClientMessage(playerid, COLOR_GRAD5,"*** Server Owner *** /createcdveh /destroycdveh /forceoffduty ");
}

if(PlayerInfo[playerid][pBanAppealer] > 0) SendClientMessage(playerid, COLOR_LIGHTRED, "*** BAN APPEALER *** /unban /unbanip ");
if(PlayerInfo[playerid][pGangMod] > 0) SendClientMessage(playerid, COLOR_LIGHTRED, "*** GANG MODERATOR *** /fcreate /fdelete /fedit /creategvehicle /destroygvehicle ");
}
return 1;
}


as you can see there in Senior Admin there are 5 SendClientMessage then

when i log on in game and check the admin help

it only 3 showing up

even in the junior admin

look at the chatlog
[18:52:14] *** Server Moderator *** /admins /check /jail /kick /skick /aduty /showflags /nrn /namechanges /reports /ar /tr /post /nro /nao /rtnc /norevive

[18:52:14] *** Junior Admin *** /spec /freeze /unfreeze /gethere /gotoid /gotoplayerscar /setvw /setint /oldcar /gotocar /entercar /jetpack /paused

[18:52:14] *** Junior Admin *** /afk /gotoco /(o)flag /(o)clearflag /ban /sban /hhcheck /slap /listguns /warn /(o)kills /(o)ipcheck /ip /goto /mark /mark2

[18:52:14] *** Senior Admin *** /prison /fine /pfine /takeadminweapons /takeweapons /release /force(death/hospital) /rto /rtoreset /mole /revive

[18:52:14] *** Senior Admin *** /reloadpvehicles /apark /aimpound /nonewbie /owarn /ocheck /ofine /oprison /respawncar(s) /deletead /atip

[18:52:14] *** Senior Admin *** /destroycar /destroycars /oban /infotoall /goldrims /cutterrims /gr /cr

[18:52:14] *** Head Admin *** /setname /forcesave /cnn /sethp /setarmor /setarmorall /pointfix /givelicense /fackick /destroypvehicle /createpvehicle

[18:52:14] *** Head Admin *** /adivorce /eventhelp /sprison /unban /unbanip /setinsurance /fcreate /fdelete /fedit /creategvehicle /destroygvehicle

[18:52:14] *** Head Admin *** /setmyname /createpvehicle /setfightingstyle /deletehit /countdown /refund /clearall /listtoys /leaders /setstat /skiptut

[18:52:14] *** Head Admin *** /makeleader /sethelper

[18:52:14] *** Server Co Owner *** /pedit /permaban /setcolor /paycheck /clearallreports /makeleader /changeuserpassword /setdonator

[18:52:14] *** Server Co Owner *** /amotd /restartserver /rmute /setadminname /fixvehall /cnnn /dedit /makeadmin /announce

[18:52:14] *** Server Owner *** /makeadmin /motd /edit /dmp(edit/next/near) /listfacpay /facpay /gotodmp /createdealership /destroydealership

[18:52:14] *** Server Owner *** /createcdveh /destroycdveh /forceoffduty

[18:52:14] *** GANG MODERATOR *** /fcreate /fdelete /fedit /creategvehicle /destroygvehicle

klimgorilla
16/03/2014, 10:58 AM
The server is not sending the messages because they are too long.

ChristianIvann09
16/03/2014, 11:01 AM
The server is not sending the messages because they are too long.

Let me test it :)

Stinged
16/03/2014, 12:11 PM
You're also using >= as ==
It's not the reason why it's not sending but it can get bugged.

I mean, you're just if a player is 1 and higher, but after it you're checking it's 2 and higher, so it will get glitchy.

Golimad
16/03/2014, 12:15 PM
^^ Instead of >= , use ==, and that's it

ChristianIvann09
16/03/2014, 12:27 PM
The server is not sending the messages because they are too long.

THANK YOU! IT WORKS

sniperwars
16/03/2014, 12:47 PM
The maximum characters the SA:MP chat can output is 128 or 256 I think.