CMD:ban (playerid, params[])
{
new Motivo;
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
if(sscanf(params, "us[47]", playerid, Motivo)) return SendClientMessage(playerid, -1, "Use: /Ban [{FF0000}ID{C0C0C0}] [{FF0000}Motivo{C0C0C0}]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, C_ERRO, "Este {FF0000}ID{C0C0C0}/{FF0000}Nome{C0C0C0} estб Offline");
SendClientMessageToAll(C_ADMIN, "{FFFFFFF}__________| {FE019F}ADMINISTRAЗГO INFORMA {FFFFFF}|__________");
format(String, sizeof(String), "{FFFFFF}%s{FF000000} Foi Banido pelo Administrador {FFFFFF}%s.{FF000000} Motivo: {FFFFFF}%s");
SendClientMessageToAll(C_VERMELHO, String);
new
d,
m,
y;
getdate(y, m, d);
format(Conta, sizeof(Conta), "Contas/Ban/%s.ini", NomeDoPlayer(playerid));
if(DOF2_FileExists(Conta)) { DOF2_CreateFile(Conta); }
DOF2_SetString(Conta, "Adm", NomeDoPlayer(playerid));
DOF2_SetString(Conta, "Motivo", Motivo);
DOF2_SetInt(Conta, "Dia", d);
DOF2_SetInt(Conta, "Mкs", m);
DOF2_SetInt(Conta, "Ano", y);
Kick(playerid);
return true;
}
DOF2_SetString(Conta, "Motivo", Motivo);
Error: 035: argument type mismatch (argument 3)
CMD:tv(playerid, params[])
{
new userid;
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
new bool: TVPlayer[MAX_PLAYERS], ID;
if(!TVPlayer[playerid])
{
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Use: /TV [{FF0000}ID{C0C0C0}]");
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(ID)) return PlayerSpectateVehicle(playerid, GetPlayerVehicleID(ID));
PlayerSpectatePlayer(playerid, userid);
format(String, sizeof(String), "Vocк estб de TV em: %s", NomeDoPlayer(playerid));
SendClientMessage(playerid, C_ERRO, String);
TVPlayer[playerid] = true;
return true;
}
else
{
TogglePlayerSpectating(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
TVPlayer[playerid] = false;
return true;
}
return true;
}
return true;
Warning: 225: unreachable code
CMD:ban (playerid, params[])
{
new Motivo[48];
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
if(sscanf(params, "us[47]", playerid, Motivo)) return SendClientMessage(playerid, -1, "Use: /Ban [{FF0000}ID{C0C0C0}] [{FF0000}Motivo{C0C0C0}]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, C_ERRO, "Este {FF0000}ID{C0C0C0}/{FF0000}Nome{C0C0C0} estб Offline");
SendClientMessageToAll(C_ADMIN, "{FFFFFFF}__________| {FE019F}ADMINISTRAЗГO INFORMA {FFFFFF}|__________");
format(String, sizeof(String), "{FFFFFF}%s{FF000000} Foi Banido pelo Administrador {FFFFFF}%s.{FF000000} Motivo: {FFFFFF}%s");
SendClientMessageToAll(C_VERMELHO, String);
new
d,
m,
y;
getdate(y, m, d);
format(Conta, sizeof(Conta), "Contas/Ban/%s.ini", NomeDoPlayer(playerid));
if(DOF2_FileExists(Conta)) { DOF2_CreateFile(Conta); }
DOF2_SetString(Conta, "Adm", NomeDoPlayer(playerid));
DOF2_SetString(Conta, "Motivo", Motivo);
DOF2_SetInt(Conta, "Dia", d);
DOF2_SetInt(Conta, "Mкs", m);
DOF2_SetInt(Conta, "Ano", y);
Kick(playerid);
return true;
}
CMD:tv(playerid, params[])
{
new userid;
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
new bool: TVPlayer[MAX_PLAYERS], ID;
if(!TVPlayer[playerid])
{
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Use: /TV [{FF0000}ID{C0C0C0}]");
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(ID)) return PlayerSpectateVehicle(playerid, GetPlayerVehicleID(ID));
PlayerSpectatePlayer(playerid, userid);
format(String, sizeof(String), "Vocк estб de TV em: %s", NomeDoPlayer(playerid));
SendClientMessage(playerid, C_ERRO, String);
TVPlayer[playerid] = true;
}
else
{
TogglePlayerSpectating(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
TVPlayer[playerid] = false;
}
return true;
}
CMD:tv(playerid, params[])
{
new userid;
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
new bool: TVPlayer[MAX_PLAYERS], ID;
if(!TVPlayer[playerid])
{
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Use: /TV [{FF0000}ID{C0C0C0}]");
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(ID)) return PlayerSpectateVehicle(playerid, GetPlayerVehicleID(ID));
PlayerSpectatePlayer(playerid, userid);
format(String, sizeof(String), "Vocк estб de TV em: %s", NomeDoPlayer(playerid));
SendClientMessage(playerid, C_ERRO, String);
TVPlayer[playerid] = true;
return true;
}
else
{
TogglePlayerSpectating(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
TVPlayer[playerid] = false;
return true;
}
}
TogglePlayerSpectating(playerid, 0);
Compilaзгo sem erro, mais o problema й que se eu der /tv no Player, nгo fico "Espiando ele" e sim olhando pro nada...
E se eu tentar dar /tv de novo, que no caso, seria pra sair do TV, nгo sai, me retorna a mensagem: Use /TV [ID] O.o |
CMD:tv(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, C_ERRO, "Vocк nгo tem autorizaзгo para utilizar este comando");
new bool: TVPlayer[MAX_PLAYERS], ID;
if(!TVPlayer[playerid])
{
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Use: /TV [{FF0000}ID{C0C0C0}]");
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(ID)) return PlayerSpectateVehicle(playerid, GetPlayerVehicleID(ID));
PlayerSpectatePlayer(playerid, ID);
format(String, sizeof(String), "Vocк estб de TV em: %s", NomeDoPlayer(playerid));
SendClientMessage(playerid, C_ERRO, String);
TVPlayer[playerid] = true;
return true;
}
else
{
TogglePlayerSpectating(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
TVPlayer[playerid] = false;
return true;
}
}