/* 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
*/
//VARIAVEIS FILTERSCRIPT
#include <a_samp>
#include sscanf2
#include dof2
#include zcmd
// FIM VARIAVEIS
// STRINGS
new Cachorro[ ] [] =
{
"[BpL] Franklin",
"[BpL] FILTERSCRIPT"
};
// COMEЗANDO A FILTERSCRIPT
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 string[128];
new Nome[24];
GetPlayerName(playerid, Nome, 24);
new Dia,Mes,Ano,Hora,Minuto,Segundo;
format(string, sizeof(string),"Jogador: %s Entrou no servidor. Data:[%d/%d/%d/] Hora:[%d/%d/%d]",Nome, Dia,Mes,Ano, Hora, Minuto,Segundo);
SendClientMessageToAll(0xFFB400FF, string);
return 1;
}
// quando o player desconecta do servidor :)
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessageToAll(0xFFB400FF, "Alguem desconectou");
return 1;
}
// comeзando a area de comandos
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/salario", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xFFB400FF, "[BpL] Todos player onlines receberam salбrio do mes ");
GivePlayerMoney(playerid, 5000);
new rand = random(sizeof(Cachorro));
new string[128];
format(string, sizeof(string),"[BpL] Todos player onlines receberam salбrio do mes ", Cachorro[rand]);
SendClientMessage(playerid, 0xFFB400FF,string);
return 1;
}
return 0;
}
CMD:resetmoney(playerid,params[]) {
ResetPlayerMoney(playerid);
new id=strval(params);
if(!strlen(params) || !IsNumeric(params)) {
SendClientMessage(playerid,0xFFB400FF,"|INFO| /resetmoney [playerid]");
}
else if(!IsPlayerConnected(id))
{
return SendClientMessage(playerid,0xFFB400FF,"Esse player nгo й um ativo");
}
else if(IsPlayerConnected(id)){
printf("ID: %d",id);
}
return 0;
}
C:\Users\Tecnoplay\Desktop\GAMEMODES\Brasil Play Legends D - Cуpia\filterscripts\gmedo.pwn(65) : error 017: undefined symbol "IsNumeric" C:\Users\Tecnoplay\Desktop\GAMEMODES\Brasil Play Legends D - Cуpia\filterscripts\gmedo.pwn(72) : warning 217: loose indentation C:\Users\Tecnoplay\Desktop\GAMEMODES\Brasil Play Legends D - Cуpia\filterscripts\gmedo.pwn(76) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
/* 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;
}
pawn Код:
|
for(new i = 0, j = GetMaxPlayers(); i < j; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i, 5000);
}
}
SendClientMessageToAll(0xFFB400FF, "[BpL]: Todos os Player online receberam o salбrio do mкs.");
Obrigado tudo certo aqui mais tipo pra criar o comando й a mesma coisa que o strcmd CMD:resetmoney(playerid,params[]) nгi vai mudar algo tipo no
new string[128] й um exemplo muda algo do cmd do strcmd ?? |
Eu coloquei oque o Multi falo nгo foi mudei a sendclientmessagetoall mais ta dando warning como eu posso fazer pra ele recer o dinheiro por taxa de horas onlines no servidor tipo 1 hr = 10 reais entendeu??
Bom obrigado ![]() |
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;
}