[Ajuda] FakeDeath
#1

Nгo consigo deixar esse cmd:

pawn Код:
if(strcmp(cmd, "/fakedeath", true) == 0) {
if(pAdmin[playerid] == 5) {
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, red, "USAGE: /fakedeath [ID do Player1] [ID do Player2] [ID da Arma]");
new killer = strval(tmp), killee = strval(tmp2), weap = strval(tmp3);
if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");
if(PlayerInfo[killer][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(PlayerInfo[killee][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
return 1;
}
Tipo Igual a este pq ta dando erro qnd compila, ai acho q o fakedeath nao ta adequado pra ser usado no meu gm algo do tipo:
pawn Код:
if(strcmp(cmd, "/fakeban", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(pAdmin[playerid] == 5){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Digite: /fakeban [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), P_CONTAS, pname);
if(IsPlayerConnected(plid)){
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} Vocк sу pode fake banir com uma Motivo apropriada.");
}else{
format(string, sizeof(string), "[x] Vocк deu um fakeban  no jogador %s.", pname);
SendClientMessage(playerid, outraadm, string);
SendClientMessage(plid, 0xFFFFFFAA, "[x] Aperte a tecla 'F8', do seu teclado!.");
SendClientMessage(plid, 0x80FF00AA, "[x] E poste a Screen Shot no Forum: nvcgames.forumbrasil.net");
GameTextForPlayer(plid,"~r~banido~w~!", 2500, 3);
format(string, sizeof(string), "[x] O Admin %s baniu o jogador: %s (Motivo: %s)", aname,pname,result);
SendClientMessageToAll(outraadm, string);
format(string, sizeof(string), "{0000FF} %s (%d) saiu do server ( Kickado / Banido ).", pname,plid);
SendClientMessageToAll(0xA8A8A8AA, string);
SendClientMessage(plid, 0xDFDFDFAA, "Server closed the connection.");
}
}else{
format(string, sizeof(string), "{0099FF}[x]{CCCCFF} ID %d nгo й valido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
Reply
#2

Que erro?
Reply
#3

Tipo da 26 errors ou seja esses 26 errors sгo de chave aberta nгo fechada entendes?
Ai eu n consigo deixar o fakedeath tipo igual o fakeban pra n da errorrs!
Reply
#4

if(strcmp(cmd, "/fakedeath", true) == 0) {
if(pAdmin[playerid] == 5) {
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, red, "USAGE: /fakedeath [ID do Player1] [ID do Player2] [ID da Arma]");
new killer = strval(tmp), killee = strval(tmp2), weap = strval(tmp3);
if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");
if(PlayerInfo[killer][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(PlayerInfo[killee][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
return 1;
}
Reply
#5

с deu!
Reply
#6

pawn Код:
if(strcmp(cmd, "/fakedeath", true) == 0) {
if(pAdmin[playerid] == 5) {
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, red, "USAGE: /fakedeath [ID do Player1] [ID do Player2] [ID da Arma]");
new killer = strval(tmp), killee = strval(tmp2), weap = strval(tmp3);
if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");
if(PlayerInfo[killer][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(PlayerInfo[killee][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
return 1;
}
}

Se Ajudei por favor +rep
Reply
#7

n deu '-'
Reply
#8

pawn Код:
if(strcmp(cmd, "/fakedeath", true) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 5){
new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, Vermelho, "USAGE: /fakedeath [ID do Player1] [ID do Player2] [ID da Arma]");
new killer = strval(tmp), killee = strval(tmp2), weap = strval(tmp3);
if(!IsValidWeapon(weap)) return SendClientMessage(playerid,Velho,"Weapon Id is never used");
if(PlayerInfo[killer][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,Velho,"You cannot use this command on this admin");
if(PlayerInfo[killee][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,Velho,"You cannot use this command on this admin");
return 1;
}
}
Reply
#9

pawn Код:
if(strcmp(cmd, "/fakedeath", true) == 0)
{
    if(pAdmin[playerid] == 5)
    {
        new tmp[30], tmp2[30], tmp3[30], Index;

        tmp  = strtok(cmdtext,Index);
        tmp2 = strtok(cmdtext,Index);
        tmp3 = strtok(cmdtext,Index);

        if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3)) return SendClientMessage(playerid, red, "USAGE: /fakedeath [ID do Player1] [ID do Player2] [ID da Arma]");

        new killer = strval(tmp);
        new killee = strval(tmp2);
        new weap   = strval(tmp3);

        if(!IsValidWeapon(weap)) return SendClientMessage(playerid,red,"ERROR: Invalid Weapon ID");

        if(PlayerInfo[killer][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        if(PlayerInfo[killee][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)