25.07.2012, 19:54
Nгo consigo deixar esse cmd:
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, "/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;
}
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;
}