Payday problem..
#1

Hello i add 2-3 payday systems and no one work. I wait for the round hour but when it's comes nothing happend. So i need Payday system - when player are in server for 1 hour gives him award or when player its in server about 20 minutes on the round hour gives him award. Please help me.
Reply
#2

This isn't a "Scripting Help, We give you codes 4 free, YES!"

We won't provide you any codes, Scripting Help meant to be a board for these scripters who are having problem on their own codes, not on "Give me plz a payday code plz".

Give us your code, Maybe we can work on it.
Reply
#3

OnFilterScriptInIt

Код:
	SetTimer("payday", 60000, 1);
Код:
forward payday(playerid);
public payday(playerid)
{
    new hh, mm, ss;
    gettime( hh, mm, ss );//-> Gives at ??:00 -> every hour (10:00/11:00 and etc)

    if( mm == 0 )
    {
	    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	    {
			new string[128];
			new RandomPay = random(50000 - 10000) + 10000;// new RandomPay = random(MAX - MIN) + MIN;
			GivePlayerMoney( playerid, RandomPay );
		    SendClientMessage(playerid, COLOR_WHITE,"Look You recived a paycheck!");
		    format(string, sizeof(string), "You have recieve a check of $%i", RandomPay);
			SendClientMessage(i, COLOR_WHITE, string);
		    SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
	    }
	}
    return 1;
}
I have this in my gamemode.
Reply
#4

Change this

PHP код:
if( mm == 
to

PHP код:
if( hh >= && mm == && ss == 
Hope it works
Reply
#5

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
Hope it works
Are you confident in that code actually working?

Код:
{
    new hh, mm, ss;
    gettime( hh, mm, ss );//-> Gives at ??:00 -> every hour (10:00/11:00 and etc)

    switch(mm)
    {
        case 0,20,40:
        {
			for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
			{
				new string[128];
				new RandomPay = random(50000 - 10000) + 10000;// new RandomPay = random(MAX - MIN) + MIN;
				GivePlayerMoney( playerid, RandomPay );
				SendClientMessage(playerid, COLOR_WHITE,"Look You recived a paycheck!");
				format(string, sizeof(string), "You have recieve a check of $%i", RandomPay);
				SendClientMessage(i, COLOR_WHITE, string);
				SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
			}
		}
	}
    return 1;
}
Try that, that should do on the hour, 20 past, and 20 to...
Reply
#6

Again dont work, dont give me award or something..
Reply
#7

Be more specific. WHAT is not working? Is it not being called, don't you get the cash? Are you using a conflicting anti cheat maybe?
Reply
#8

Umm dont give me message, cash for payday.I have anticheat but i'm sure the problem it's not there.
Reply
#9

Help please?
Reply
#10

Code +REP

Код:
#include <a_samp>
#include <zcmd>

public OnFilterScriptInit()
{
	print (" MRSAS Payday ");
	return 1;
}

CMD:payday(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
		SendClientMessageToAll(0xffff, " RCON Admin Has Started A Payday And Gave All Players 5000+ Coins :)");
        for(new i; i<MAX_PLAYERS; i++)
        {
        GivePlayerMoney(playerid,5000);
        }
    }
    else
    {
	SendClientMessage(playerid, 0xffff, " You Must Be A Rcon Admin To Use This Command!");
    }
    return 1;
}
Warning: Must Be Logged In As A RCON Leader " /rcon login Password " Then Use This Command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)