06.07.2012, 14:48
so... i made chat for ppls wich will have trol status... so i i made like this and i alos fixed some errors but idk how to fix that 2.
PHP код:
if(strcmp(cmd, "/trolchat", true) == 0 || strcmp(cmd, "/ttc", true) == 0)
{
new message[128], string[128];
if(sscanf(params, string[128], message))
{
SendClientMessage(playerid, COLOR_WHITE, "TROLL: /ttc [MESSAGE]");
}
else
{
if(PlayerInfo[playerid][ptroll] >= 1)
{
if(strlen(message) < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "TROLL: /ttc [MESSAGE]");
}
else
{
format(string, sizeof(string), "[TROLL OOC] %s says (Level %d): %s", sendername, PlayerInfo[playerid][ptroll], message);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][ptroll] >= 1)
{
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
}
return 1;
}
Код:
C:\Users\MaticKepa\Desktop\Real Life ENG\gamemodes\mazda.pwn(87044) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\MaticKepa\Desktop\Real Life ENG\gamemodes\mazda.pwn(87045) : error 017: undefined symbol "params" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.