Halp [Random Amount]
#6

Yes it's possible
pawn Код:
new money,score,wep;

OnGameModeInit()
{
    //code
    money = CreatePickup(params..);
    score = CreatePickup(params..);
    wep = CreatePickup(params..);
    return 1;
}

OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == money)
    {
        new cash = 2000 + random(3000);
        new str[128];
        GivePlayerMoney(playerid, cash);
        format(str, 128, "You have picked up $%i.", cash);
        SendClientMessage(playerid, -1, playerid);
        return 1;
    }
    else if(pickupid == score)
    {
        new sc = random(10);
        SetPlayerScore(playerid, GetPlayerScore(playerid) + sc);
        new str[60];
        format(str,60,"We added %i score to your's",sc);
        SendClientMessage(playerid,-1,str);
    }
    else if(pickupid==wep)
    {
        new w=0;
        for(;w==0 || (w>=19 && w<=21);) { w=random(44);}
        new ammo = random(1000);
        GivePlayerWeapon(playerid,w,ammo);
        new str[128],wname[20];
        GetWeaponName(w,wname,20);
        if(w == 18) format(wname,20,"Molotov Cocktail");
        format(str,128,"You received %s(%i).",wname,ammo);
        SendClientMessage(playerid,-1,str);
    }
}
Reply


Messages In This Thread
Halp [Random Amount] - by [CG]Milito - 27.11.2012, 21:42
Re: Halp [Random Amount] - by GWMPT - 27.11.2012, 21:44
Re: Halp [Random Amount] - by [CG]Milito - 27.11.2012, 21:53
Re: Halp [Random Amount] - by maramizo - 27.11.2012, 22:26
Respuesta: Halp [Random Amount] - by [CG]Milito - 30.11.2012, 01:59
Re: Halp [Random Amount] - by [MM]RoXoR[FS] - 30.11.2012, 05:03

Forum Jump:


Users browsing this thread: 1 Guest(s)