04.01.2015, 16:37
Hey, I've been trying and trying, but can't figure it out.
I am doing a custom SendClientMessageToAll function, but it just doesn't work.
My code is:
So what i imagined i would see in game would be: {A9FF63}[ANTI-CHEAT] {FFFFFF}CrazyChoco has been kicked from the server. {9DFF8C}[REASON] {FFFFFF}Test reason.
But When i compile i recieve these warnings;
I am doing a custom SendClientMessageToAll function, but it just doesn't work.
My code is:
pawn Код:
stock AntiCheatKick(playerid, string[], reason[])
{
new string[100];
format(string, sizeof(string), "{A9FF63}[ANTI-CHEAT] {FFFFFF}%s has been kicked from the server. {9DFF8C}[REASON] {FFFFFF}%s", GetPlayerName(playerid), reason);
SendClientMessageToAll(-1, string);
SetTimerEx("AntiCheatKickFunction", 1000, 0, "d", playerid);
}
AntiCheatKick(playerid, string, "Test reason"); //The function I should use and then it'll paste the string and afterwards i could write the reason.
But When i compile i recieve these warnings;
Код HTML:
C:\Users\us\Desktop\SA-MP 0.3z\gamemodes\gamemode.pwn(315) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\us\Desktop\SA-MP 0.3z\gamemodes\gamemode.pwn(316) : warning 202: number of arguments does not match definition C:\Users\us\Desktop\SA-MP 0.3z\gamemodes\gamemode.pwn(316) : warning 202: number of arguments does not match definition C:\Users\us\Desktop\SA-MP 0.3z\gamemodes\gamemode.pwn(313) : warning 203: symbol is never used: "string"