[FilterScript] Ammunation Minigame
#1

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)
Reply
#2

nice =p one
Reply
#3

Nice man!
Reply
#4

Great work!
Reply
#5

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?
Reply
#6

Uhm i need zcmd for it
Reply
#7

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

Looks great, I'll make a video soon.
Reply
#9

Nice, good job!
Reply
#10

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
Reply
#11

nice job man, good idea
Reply
#12

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
Reply
#13

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...
Reply
#14

if you know what i mean...
Reply
#15

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;
}
Reply
#16

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
Reply
#17

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]
Reply
#18

@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.
Reply
#19

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;
}
Reply
#20

@Blatnoi, hackzor! :P
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)