19.12.2014, 23:17
pawn Код:
/* Eae pessoal tudo blz??
bom essa filterscript foi criada por franklin_qaeda :D espero que a FS te ajude em algumas coisas
acompanhe as atualizaзхes na SA-MP FORЪM :D
v0.1
*/
//Includes FILTERSCRIPT
#include <a_samp>
#include sscanf2
#include dof2
#include zcmd
/*new Cachorro[ ] [] =
{
"[BpL] Franklin",
"[BpL] FILTERSCRIPT"
};*/
//Variбveis
new String[128];
public OnFilterScriptInit()
{
print("-FILTER SCRIPT CRIADA POR FRANKLIN- INICIADA");
return 1;
}
public OnFilterScriptExit()
{
print("-FILTERSCRIPT CRIADA POR FRANKLIN- UNLOADED");
return 1;
}
public OnPlayerConnect(playerid)
{
new Dia,Mes,Ano,Hora,Minuto,Segundo;
gettime(Hora, Minuto, Segundo);
getdate(Ano, Mes, Dia);
format(String, sizeof(String),"Jogador: %s Entrou no servidor. Data:[%d/%d/%d/] Hora:[%d/%d/%d]", Nome(playerid), Dia,Mes,Ano, Hora, Minuto,Segundo);
SendClientMessageToAll(0xFFB400FF, String);
return 1;
}
// quando o player desconecta do servidor :)
public OnPlayerDisconnect(playerid, reason)
{
format(String, sizeof(String), "O Jogador %s saiu do servidor.", Nome(playerid));
SendClientMessageToAll(0xFFB400FF, String);
return 1;
}
CMD:salario(playerid, params[])
{
for(new i = 0, j = GetMaxPlayers(); i < j; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i, 5000);
SendClientMessage(i, 0xFFB400FF, "[BpL]: Todos os Player online receberam o salбrio do mкs.");
}
}
return 1;
}
CMD:resetmoney(playerid,params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USO: /resetmoney [Playerid]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Jogador Invбlido!");
ResetPlayerMoney(id);
return 1;
}
/*IsNumeric(const Linha[])
{
for (new i = 0, j = strlen(Linha); i < j; i++)
{
if (Linha[i] > '9' || Linha[i] < '0')
return 0;
}
return 1;
}*/
Nome(playerid)
{
new Nomes[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nomes, sizeof(Nomes));
return Nomes;
}
Retirei coisas inъteis, e coloquei coisas ъteis, e tirei o strcmp para fazer comando, e coloquei em zCMD.
Arrumei quase tudo.
0 Erros e 0 Warnings.