SA-MP Forums Archive
[FilterScript] Ammunation Minigame - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Ammunation Minigame (/showthread.php?tid=179452)

Pages: 1 2


Ammunation Minigame - Retardedwolf - 26.09.2010

Ammunation Minigame script

I created this version of a ammunation minigame but then I just realised that in Singleplayer that it was you and another bot shooting at targets but I decided I would release this for people who actually wants to use this.


Features
• Random position targets
• Random object ids
• Usage of PVar


Download


Information
• It creates player objects so only you can see the targets.
• /starttraining - Starts minigame.
• /stoptraining - Stops minigame.
• /bringmetoshootrange - Teleports you to shooting range.


How to install?
• Download ZCMD
• Copy the filterscript from Pastebin and put it into your filterscripts folder and compile it
• Open up your server.cfg and add filterscript to the filterscripts list.


Credits
• SAMP team.
• People who helped me in scripting.
• Zeex for ZCMD
• misko28 for ObjectToPoint
• CracK for GetPosFromView


Screenshots / Video
http://i.imgur.com/gblVN.jpg
http://i.imgur.com/h712X.jpg
• (NOTE : The crosshair and explosion is a mod)
[ame]http://www.youtube.com/watch?v=27IykmNo0tU&feature=player_embedded[/ame]

(Thanks Blatnoi)


Re: Ammunation Minigame - westorz - 26.09.2010

nice =p one


Re: Ammunation Minigame - DSK_Vyorel - 27.09.2010

Nice man!


Re: Ammunation Minigame - Basicz - 27.09.2010

Great work!


Re: Ammunation Minigame - Retardedwolf - 27.09.2010

Quote:
Originally Posted by Basicz
Посмотреть сообщение
Great work!
Quote:
Originally Posted by DSK_Vyorel
Посмотреть сообщение
Nice man!
Quote:
Originally Posted by westorz
Посмотреть сообщение
nice =p one
Thank you.


Someone mind posting a video?


Re: Ammunation Minigame - westorz - 27.09.2010

Uhm i need zcmd for it


Re: Ammunation Minigame - Retardedwolf - 27.09.2010

Quote:
Originally Posted by westorz
Посмотреть сообщение
Uhm i need zcmd for it
Its just an include :O


Re: Ammunation Minigame - willsuckformoney - 27.09.2010

Looks great, I'll make a video soon.


Respuesta: Ammunation Minigame - MrDeath537 - 27.09.2010

Nice, good job!


Re: Ammunation Minigame - Lynn - 13.12.2010

Looks quite good :P
I made a Shooting range a lot like this :P
But I had a whole training course.
But I never released it xD


Re: Ammunation Minigame - Cacoby - 14.12.2010

nice job man, good idea


Re: Ammunation Minigame - Blatnoi - 14.12.2010

the script is real nice .. i'm trying to add score system
pawn Код:
new tscore;
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPVarInt(playerid, "training") == 1)
    {
        if(newkeys & KEY_FIRE && GetPlayerWeapon(playerid) != 0)
        {
            new Float:x,
                Float:y,
                Float:z;
            GetPosFromView(playerid, 80, x, y, z);
            for(new  ob,l=MAX_OBJECTS;ob<l;ob++)
            {
                if(ObjectToPoint(playerid, 1,ob, x, y, z) != 0)
                {
                    tscore++;
                    DestroyPlayerObject(playerid, ob);
                }
                }
        }
        return 1;
    }
    return 0;
}
pawn Код:
COMMAND:tscore(playerid, params[])
{
    new string[128];
    format( string, sizeof( string ), "Score = %d", tscore);
    SendClientMessage(playerid, FAILURE, string );
    return 1;
}
what i'm doing wrong ? Oo
score doesn't update and it stays on 0


Re: Ammunation Minigame - Johny_Cole - 14.12.2010

Quote:
Originally Posted by Lynn
Посмотреть сообщение
Looks quite good :P
I made a Shooting range a lot like this :P
But I had a whole training course.
But I never released it xD
Well...make a video or screenshot...


Re: Ammunation Minigame - Johny_Cole - 14.12.2010

if you know what i mean...


Re: Ammunation Minigame - Retardedwolf - 14.12.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Screenshots
http://i.imgur.com/gblVN.jpg
http://i.imgur.com/h712X.jpg
• (NOTE : The crosshair and explosion is a mod)
• Can someone please upload a video of this filterscript?(ATM Australia internet is slow ass it will take me a life to upload it)
@Blatnoi,

pawn Код:
new tScore [ MAX_PLAYERS];

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPVarInt(playerid, "training") == 1)
    {
        if(newkeys & KEY_FIRE && GetPlayerWeapon(playerid) != 0)
        {
            new Float:x,
                Float:y,
                Float:z;
            GetPosFromView(playerid, 80, x, y, z);
            for(new  ob,l=MAX_OBJECTS;ob<l;ob++)
            {
                if(ObjectToPoint(playerid, 1,ob, x, y, z) != 0)
                {
                    tscore [ playerid ] ++;
                    DestroyPlayerObject(playerid, ob);
                }
                }
        }
        return 1;
    }
    return 0;
}

COMMAND:tscore( playerid, params [ ])
{
    new
        string [15];
    format ( string, sizeof( string ), "Score = %d", tscore [ playerid ] );
    SendClientMessage ( playerid, SUCCESS, string );
    return 1;
}



Re: Ammunation Minigame - Blatnoi - 14.12.2010

Retardedwolf
it doesn't meter i just tried to make it simple for the beginning i will add this in my playerstatic enum anyway ...
i even added
pawn Код:
SendClientMessage(playerid, SUCCESS, "TEST");
but didn't get any message after shot


Re: Ammunation Minigame - Blatnoi - 14.12.2010

Quote:

• Can someone please upload a video of this filterscript?(ATM Australia internet is slow ass it will take me a life to upload it)

[ame]http://www.youtube.com/watch?v=27IykmNo0tU[/ame]


Re: Ammunation Minigame - Retardedwolf - 14.12.2010

@Blatnoi, thanks for the video.

The code for score system is just based off your's I just edited a little it might be your script's problem it not working.


Re: Ammunation Minigame - Blatnoi - 14.12.2010

Quote:

The code for score system is just based off your's I just edited a little it might be your script's problem it not working.

yep i know you did personal score for every playerid
as i already said don't know why but even SendClientMessage doesn't work
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(GetPVarInt(playerid, "training") == 1)
    {
        if(newkeys & KEY_FIRE && GetPlayerWeapon(playerid) != 0)
        {
            new Float:x,
                Float:y,
                Float:z;
            GetPosFromView(playerid, 80, x, y, z);
            for(new  ob,l=MAX_OBJECTS;ob<l;ob++)
            {
                if(ObjectToPoint(playerid, 1,ob, x, y, z) != 0)
                {
                    SendClientMessage(playerid, SUCCESS, "TEST");
                    DestroyPlayerObject(playerid, ob);
                }
                }
        }
        return 1;
    }
    return 0;
}



Re: Ammunation Minigame - Luka P. - 14.12.2010

@Blatnoi, hackzor! :P