get cash every 15 minutes
#1

Hi i was wondering if it is possible , to give like 50$ every 15minutes to players , cause i cant find a jobs filterscript for las venturas

thnx allready
Reply
#2

lol you can't just find jobs on your erver, you must make them
Reply
#3

Quote:
Originally Posted by JakeMiller
Посмотреть сообщение
lol you can't just find jobs on your erver, you must make them
Nooo u serious :O
Lol like i didnt know that ... I mean i dont find a filterscript on the forums for it cause i cant make that myself
Reply
#4

lv? ur map
Reply
#5

Quote:
Originally Posted by JakeMiller
Посмотреть сообщение
lv? ur map
Yeh
Reply
#6

So you want to give all players an amount of cash every 15 minutes? Well it's easy using timers

pawn Код:
#include <a_samp>

#define CASH 50 // the amount of the cash which you will give to all players

forward GiveAllCash();

public GiveAllCash()
{
    for(new i = 0; i < MAX_PLAYERS; i ++) // loops through all players
    {
        if(!IsPlayerConnected(i)) // if they are not connected
            continue; // skip
        // here they are connected so give them the cash
        GivePlayerMoney(i, CASH); // here comes CASH that we defined above
    }
    return 1;
}


public OnGameModeInit() // or you can use OnFilterScriptInit() if it's a filterscript
{
    SetTimer("GiveAllCash", 300000, true);
    /*
        1st parameter "GiveAllCash": The forwared public that the timer will call every 5 minutes which does all the work
        2nd parameter 300000: The interval time. 300000 ms = 5 300 sec = 5 min
        3rd parameter true: Means the timer will call this public repeatdly
    */

    return 1;
}
Reply
#7

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
So you want to give all players an amount of cash every 15 minutes? Well it's easy using timers

pawn Код:
#include <a_samp>

#define CASH 50 // the amount of the cash which you will give to all players

forward GiveAllCash();

public GiveAllCash()
{
    for(new i = 0; i < MAX_PLAYERS; i ++) // loops through all players
    {
        if(!IsPlayerConnected(i)) // if they are not connected
            continue; // skip
        // here they are connected so give them the cash
        GivePlayerMoney(i, CASH); // here comes CASH that we defined above
    }
    return 1;
}


public OnGameModeInit() // or you can use OnFilterScriptInit() if it's a filterscript
{
    SetTimer("GiveAllCash", 300000, true);
    /*
        1st parameter "GiveAllCash": The forwared public that the timer will call every 5 minutes which does all the work
        2nd parameter 300000: The interval time. 300000 ms = 5 300 sec = 5 min
        3rd parameter true: Means the timer will call this public repeatdly
    */

    return 1;
}
Thnx mate i'll try this tommorow i'm on ipad now , not my pc ^^
Thats every 5minutes right??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)