[Ajuda]script - payday
#1

me ajudem a conseguir fazer o payday funcionar sу falta colocar pra dar de 1h em 1h
pawn Код:
public Up()
{
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
new aname[MAX_PLAYER_NAME];
GetPlayerName(i, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
new string[256];
if(dini_Int(file, "Profissao") == Desempregado){
SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(i,  0xFFFFFFAA,"» Ministйrio do Trabalho:");
SendClientMessage(i,  0xFFFFFFAA,"Assistкncia financeira temporбria ao trabalhador desempregado!");
SendClientMessage(i,  0xFFFFFFAA,"Vocк recebeu 65,00 R$ do Seguro-Desemprego!");
SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
GivePlayerGrana(i, 65);
Reply
#2

em OnGameModeInt
pawn Код:
SetTimer("Up", 60 * 60 * 1000, true);
identado fica melhor lol
pawn Код:
public Up()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new aname[MAX_PLAYER_NAME];
            GetPlayerName(i, aname, MAX_PLAYER_NAME);
            format(file, sizeof(file), PASTA_CONTAS, aname);
            new string[128];
            if(dini_Int(file, "Profissao") == Desempregado)
            {
                SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
                SendClientMessage(i,  0xFFFFFFAA,"» Ministйrio do Trabalho:");
                SendClientMessage(i,  0xFFFFFFAA,"Assistкncia financeira temporбria ao trabalhador desempregado!");
                SendClientMessage(i,  0xFFFFFFAA,"Vocк recebeu 65,00 R$ do Seguro-Desemprego!");
                SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
                GivePlayerGrana(i, 65);
muca detect '-'
Reply
#3

muca detect '-'?
Reply
#4

pawn Код:
//OnGameModeInit
SetTimer("Up", 60000 * 60, true); // 60000 = 1 minuto | 60000 * 60 = 1minutox60minutos

public Up()
{
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i))
        {
            new aname[MAX_PLAYER_NAME], string[128];
            GetPlayerName(i, aname, MAX_PLAYER_NAME);
            format(file, sizeof(file), PASTA_CONTAS, aname);
            if(dini_Int(file, "Profissao") == Desempregado)
            {
                SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
                SendClientMessage(i,  0xFFFFFFAA,"» Ministйrio do Trabalho:");
                SendClientMessage(i,  0xFFFFFFAA,"Assistкncia financeira temporбria ao trabalhador desempregado!");
                SendClientMessage(i,  0xFFFFFFAA,"Vocк recebeu 65,00 R$ do Seguro-Desemprego!");
                SendClientMessage(i,  0xC10000AA,"~~~~~~~~~~~~~~~~~~~~~~ Sбlario ~~~~~~~~~~~~~~~~~~~~~~");
                GivePlayerGrana(i, 65);
            }
        }
    }
    return true;
}
Faltavam as chavetas e o return no final. Nгo olhei para o resto do cуdigo, mas parece estar correto.
Reply
#5

as chaves nгo estгo fechadas porque tem mais profissгo no final sу coloquei a parte importante
Reply
#6

SetTimer("message", 60000 * 60, true); esse message era pra ser up certo?
Reply
#7

olha o settimer do meu post so adicione em ongamemodint ....
Reply
#8

hum... ok jб adicionei tambem poderia ajudar a fazer um comando de force payday?
Reply
#9

sim faзo jaja dou edit aki nesse post...

@edit

pawn Код:
if(strcmp("/upar", cmdtext, true, 10) == 0)
{
    Up();
    return 1;
}
muca muca muca -q
Reply
#10

valeu, nгo sei mecher nesses negocios de tempo...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)