/unban help
#5

pawn Код:
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(giveplayer));
            SendClientMessage(playerid, COLOR_WHITE, " ");
            format(string, 256, "___________________________________________", tmp);
            SendClientMessage(playerid,COLOR_WHITE,string,1);
            format(string, 256, "[Unban] - %s je uspjesno unbanan!", tmp);
            SendClientMessage(playerid,COLOR_YELLOW,string,1);
            SendClientMessage(playerid, COLOR_WHITE, "___________________________________________");
            format(string, 256, " |A| %s je uspjesno unbanao igraca %s", sendername, tmp);
            printf(string);
            format(string,sizeof(string),"%s.ini",tmp);
            fremove(string);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "___________________________________________", tmp);

Why do you format this string? and why does it have 256 lengh if SAMP chatbox can only hold 129 charaters? and whats the point of that tmp variable if you are not using it on that format?

SendClientMessage(playerid,COLOR_WHITE,string,1);

If that function only holds 3 parameters why do you add another one?

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));

Why do you get again the players name if you are no longer using them again?


" Can u do it for me just fix errors and post as Pawno code "

Whats the point of us doing it for you if you wont know whats wrong nor learn something from it?

If you cant fix such a little ban command now and we fix it for you, we will get more threads from you, i suggest you to review the gamemodes section of this forums and download one since it doesnt seem you wanna learn something.
Reply


Messages In This Thread
/unban help - by Dusan01 - 16.11.2011, 14:35
Re: /unban help - by Calgon - 16.11.2011, 14:40
Re: /unban help - by Dusan01 - 16.11.2011, 15:59
Re: /unban help - by Calgon - 16.11.2011, 16:07
Respuesta: /unban help - by kirk - 16.11.2011, 16:15

Forum Jump:


Users browsing this thread: 2 Guest(s)