Quote:
Originally Posted by [FTC]Scorpion
PHP код:
530 C:\Users\Casa\Desktop\SAMP\gamemodes\[PSA].pwn(530) : warning: 219: local variable "idx" shadows a variable at a preceding level
1642 C:\Users\Casa\Desktop\SAMP\gamemodes\[PSA].pwn(530) : warning: 203: symbol is never used: "idx"
Sу que nгo existe a linha 1642.
Meu GM acaba na 1641, ._.
|
Fiz um pra vocк, isto deve resolver o seu problema
:
Coloque
:
pawn Код:
//No OnPlayerCommandText:
if(!strcmp("/kick", cmdtext, true, 5))
{
#if defined pAdmin
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,0xFFFFFFAA,"Vocк nгo й um Administrador do servidor !");
#else
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"Vocк nгo й um Administrador do servidor !");
#endif
new foco[128], foco2[128], text[128], AdminNick[MAX_PLAYER_NAME], KickadoNick[MAX_PLAYER_NAME];
foco = KcmD(1,cmdtext),
foco2 = KcmD(2,cmdtext);
if(!strlen(foco)) return SendClientMessage(playerid,0xFFFFFFAA,"Digite: /kick [id] [motivo]");
if(!strlen(foco2)) return SendClientMessage(playerid,0xFFFFFFAA,"Digite: /kick [id] [motivo]");
GetPlayerName(playerid,AdminNick,MAX_PLAYER_NAME),
GetPlayerName(strval(foco),KickadoNick,MAX_PLAYER_NAME),
format(text,sizeof(text),"[Server] O Administrador %s kickou o jogador %s. Motivo: %s",AdminNick,KickadoNick,foco2),
SendClientMessageToAll(0x33CCFFAA, text),
Kick(strval(foco));
return true;
}
//No Final do seu GM:
stock KcmD(param, cmdtext[])
{
new string[128], pos, var;
format(string, sizeof(string), "%s ", cmdtext);
while((pos = strfind(string, " ", true)) != -1)
{
if(var == param) return string;
var++;
strdel(string, 0, pos + 1);
if(strcmp(string, " ", true, pos) == 0) goto end;
}
end:
string[0] = '\0';
return string;
}
Espero ter ajudado
.