CMD:sos(playerid, params[]) { new Texto[126], snd[MAX_PLAYER_NAME]; GetPlayerName(playerid,snd,sizeof(snd)); if(sscanf(params, "s[126]", Texto)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /sos [Dъvida aqui]"); for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdmin] > 0) { format(String, sizeof(String), "{FA5282}[ HELP ] por %s [%d]: %s", snd, playerid, Texto); GameTextForPlayer(i, "~r~NOVATO PEDIU AJUDA!", 3000, 3); SendClientMessage(i, 0xEAEA00AA, String); } } SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!"); return 1; }
CMD:setlevel(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2000) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Vocк nгo й Administrador!"); new qnt, string[126], pname[MAX_PLAYER_NAME], giverid; if(sscanf(params, "ud", giverid, qnt)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Uso: /setlevel [ID] [level]"); if(!IsPlayerConnected(giverid)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Jogador nгo conectado."); GetPlayerName(giverid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "{00FF00}[NVC Admin] Vocк setou o level do Jogador %s para %d .", pname, qnt); SendClientMessage(playerid, AZUL, string); format(string, sizeof(string), "{00FF00}[NVC Admin] O administrador %s setou seu level para %d .", nome(playerid), qnt); SendClientMessage(giverid, AZUL, string); print(string); DOF2_SetInt(arquivo, "Level", qnt); SetPlayerScore(giverid, qnt); DOF2_SaveFile(); return 1; }
CMD:sos(playerid, params[])
{
new Texto[126], snd[MAX_PLAYER_NAME];
GetPlayerName(playerid,snd,sizeof(snd));
if(sscanf(params, "s[126]", Texto)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /Sos [Duvida]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
format(String, sizeof(String), "{FF0000}[ PEDIDO DE AJUDA ] {FFFF40}%s [%d] diz:{FFFFFF} %s", snd, playerid, Texto);
GameTextForPlayer(i, "Pedido de ajuda ~n~recebido", 3000, 3);
SendClientMessage(i, 0xEAEA00AA, String);
}
}
SendClientMessage(playerid, VERMELHO_ESCURO, "[ » ]{949494} Pedido de Ajuda Enviado, espere algum Moderador / Administrador responder ...");
return 1;
}
CMD:sos(playerid, params[])
{
new IDx, Texto[126], snd[MAX_PLAYER_NAME];
GetPlayerName(playerid,snd,sizeof(snd));
if(sscanf(params, "si", Texto, IDx)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /sos [Dъvida aqui]");
if(PlayerInfo[IDx][pAdmin] > 0)
{
format(String, sizeof(String), "{FA5282}[ HELP ] por %s [%d]: %s", snd, playerid, Texto);
GameTextForPlayer(IDx, "~r~NOVATO PEDIU AJUDA!", 3000, 3);
SendClientMessage(IDx, 0xEAEA00AA, String);
}
}
SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!");
return 1;
}
Sim sou eu , estou criando meu servidor e achei seu gm otimo para base
|
(5278) : warning 209: function "cmd_sos" should return a value
(5279) : error 021: symbol already defined: "SendClientMessage"
(5280) : error 010: invalid function or declaration
}
SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!");
return 0;
CMD:sos(playerid, params[])
{
new IDx, Texto[126], snd[MAX_PLAYER_NAME];
GetPlayerName(playerid,snd,sizeof(snd));
if(sscanf(params, "si", Texto, IDx)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /sos [Dъvida aqui]");
if(PlayerInfo[IDx][pAdmin] > 0)
{
format(String, sizeof(String), "{FA5282}[ HELP ] por %s [%d]: %s", snd, playerid, Texto);
GameTextForPlayer(IDx, "~r~NOVATO PEDIU AJUDA!", 3000, 3);
SendClientMessage(IDx, 0xEAEA00AA, String);
}
}
SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!");
return 1;
}
Amigo apresentou dois erros:
pawn Код:
pawn Код:
|
Falae bruninho_step
O Cara que copiou meu Gm ... Serб que tem algo parecido entre seu code й o original da BCV ? pawn Код:
Se liga: http://creativecommons.org/licenses/by-nc-nd/3.0/br/ |
#define VERMELHO_ESCURO 0xFF0000AA
enum Info
{
pAdmin
};
new PlayerInfo[MAX_PLAYERS][Info];
CMD:sos(playerid, params[])
{
new String[128];
new Texto[126], snd[MAX_PLAYER_NAME];
GetPlayerName(playerid,snd,sizeof(snd));
if(sscanf(params, "s[126]", Texto)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[x] Use /sos [Dъvida aqui]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
format(String, sizeof(String), "{FA5282}[ HELP ] por %s [%d]: %s", snd, playerid, Texto);
GameTextForPlayer(i, "~r~NOVATO PEDIU AJUDA!", 3000, 3);
SendClientMessage(i, 0xEAEA00AA, String);
}
}
SendClientMessage(playerid, VERMELHO_ESCURO, "[ > ] Pedido de ajuda enviado com sucesso!");
return 1;
}