[HELP] Random money between 50k-100k
#9

Quote:
Originally Posted by mmrk
Посмотреть сообщение
Maybe something liks this:
pawn Код:
#include <a_samp>
#define COLOR_DARKRED 0xAA3333AA

new
    gRobbed[MAX_PLAYERS];

//Checkpoints
new RobSexShop;
//Forwards
forward Sex(playerid);
forward RobTimer(playerid);

public OnFilterScriptInit()
{
    //Checkpoints
    RobSexShop = CreatePickup(1273, 23, -103.82875823975,-22.51379776001,999.71875); //ExitSexShop
   
    SetTimer("RobTimer", 1000, 1);
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    //RobSexShop~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == RobSexShop) {
        SendClientMessage(playerid,COLOR_DARKRED,"/robsex to rob the Sex Shop");
    }
    return 0;
}
public OnPlayerConnect(playerid)
{
    gRobbed[playerid] = 0;
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/robsex", true))
    {
        new
            moneyrand = random(50000)+45000,
            weprand = random(1)+0
        ;
        if(gRobbed[playerid] != 0) return SendClientMessage(playerid, COLOR_DARKRED, "The Sex Shop has redencly been robbed!!!");
        GivePlayerMoney(playerid, moneyrand);
        GivePlayerWeapon(playerid, weprand, 150);
        gRobbed[playerid] = 300;
        return 1;
    }
    return 0;
}
public RobTimer(playerid)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(gRobbed[i] > 0)
            {
                gRobbed[i]--;
            }
        }
    }
    return 1;
}
Thanks, that work
Reply


Messages In This Thread
[HELP] Rob random money between 50k-100k - by Larsey123IsMe - 14.11.2010, 14:15
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 14.11.2010, 21:16
Re: [HELP] Random money between 50k-100k - by willsuckformoney - 14.11.2010, 21:21
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 14.11.2010, 21:33
Re: [HELP] Random money between 50k-100k - by Kitten - 14.11.2010, 21:40
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 14.11.2010, 21:49
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 15.11.2010, 00:25
Re: [HELP] Random money between 50k-100k - by mmrk - 15.11.2010, 05:15
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 15.11.2010, 12:32
Re: [HELP] Random money between 50k-100k - by Larsey123IsMe - 15.11.2010, 13:27

Forum Jump:


Users browsing this thread: 2 Guest(s)