SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 25/04/2011, 03:33 AM   #1
Kitten
High-roller
 
Kitten's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 2,356
Reputation: 249
Default Mystery Box

SA-MP Mystery Box

Description: this is a simple script i made for my server and i thought of releasing it for others who need it

What is this: this is a simple script that you goto /mystery which is a teleport or go to it (las venturas by the ammunation by the freeway in the back) once you enter the checkpoint you will get a random weapon i created in the script every 9 second you can go in the checkpoint and get another random weapon remember that to keep credits but also you can change the timers into 2 mins to go back in checkpoint feel free to edit do not rerelease without permission thanks for viewing this thread

Video or Picture?:
Sure why not a video:




EDIT: idiot me forgot to put the script

pawn Code:
#include <a_samp>
new OnceWep = 0;
forward CantEnter ( playerid ) ;
public OnFilterScriptInit ( ) {
    print ( " \n-------------------------------------- " ) ;
    print ( "Mystery Box. By kitten. " ) ;
    print ( "--------------------------------------\n " ) ;
    CreateObject(3796,2201.34838867,940.03344727,9.82031250,0.00000000,0.00000000,90.00000000); //object(acbox1_sfs) (1)
    CreateObject(2479,2200.79223633,941.10388184,10.04944992,0.00000000,0.00000000,0.00000000); //object(model_box8) (1)
    CreateObject(2654,2201.06958008,939.86657715,10.13977718,0.00000000,0.00000000,0.00000000); //object(cj_shoe_box) (1)
    CreateObject(1337,2197.21093750,940.71875000,8.82031250,0.00000000,0.00000000,0.00000000); //object(1)
    CreateObject(1337,2195.87402344,937.44952393,10.07031250,0.00000000,0.00000000,0.00000000); //object(2)
    CreateObject(3100,2201.69287109,940.03857422,9.95987606,0.00000000,0.00000000,0.00000000); //object(k_poolballspt02) (1)
    CreateObject(2999,2201.99609375,940.67407227,9.95987606,0.00000000,0.00000000,0.00000000); //object(k_poolballstp05) (1)
    CreateObject(1546,2200.25219727,940.21038818,10.01100349,0.00000000,0.00000000,0.00000000); //object(cj_pint_glass) (1)
    CreateObject(1951,2201.56274414,940.41436768,10.11004257,0.00000000,0.00000000,0.00000000); //object(kb_beer01) (1)
    CreateObject(1732,2204.18432617,941.90368652,10.66728306,0.00000000,0.00000000,0.00000000); //object(cj_juke_box) (1)
    CreateObject(1545,2201.98144531,941.39990234,10.29983997,0.00000000,0.00000000,0.00000000); //object(cj_b_optic1) (1)
    CreateObject(1337,2200.13305664,940.76000977,10.17187500,0.00000000,0.00000000,0.00000000); //object(3)
    CreateObject(1337,2201.29052734,940.36968994,10.17187500,0.00000000,0.00000000,0.00000000); //object(4)
    CreateObject(1337,2199.88793945,939.71478271,10.17187500,0.00000000,0.00000000,0.00000000); //object(5)
    CreateObject(1337,2201.84057617,939.38525391,10.17187500,0.00000000,0.00000000,0.00000000); //object(6)
    CreateObject(1337,2201.53833008,940.72070312,10.17187500,0.00000000,0.00000000,0.00000000); //object(7)
    CreateObject(1337,2200.26293945,941.03723145,10.17187500,0.00000000,0.00000000,0.00000000); //object(8)
    CreateObject(1337,2202.07348633,940.25891113,10.17187500,0.00000000,0.00000000,0.00000000); //object(9)
    CreateObject(1337,2201.96606445,939.67297363,10.17187500,0.00000000,0.00000000,0.00000000); //object(10)
    CreateObject(1337,2200.07666016,940.62884521,10.17187500,0.00000000,0.00000000,0.00000000); //object(11)
    CreateObject(1337,2200.21020508,939.39300537,10.17187500,0.00000000,0.00000000,0.00000000); //object(12)
    CreateObject(1337,2200.78051758,941.39953613,10.17187500,0.00000000,0.00000000,0.00000000); //object(13)
    return 1;
}

public OnFilterScriptExit ( ) {
    return 1;
}
public OnPlayerSpawn ( playerid ) {
    SetPlayerCheckpoint(playerid, 2201.1172,936.5582,10.8203, 4.0);
    return 1;
}
public OnPlayerCommandText ( playerid , cmdtext[] ) {
    if ( strcmp ( "/mystery " , cmdtext , true , 10 ) == 0 )
    {
        SetPlayerPos ( playerid , 2207.8540,925.2859,10.8203 ) ;
        SetPlayerFacingAngle ( playerid , 21.1978 ) ;
        return 1;
    }
    return 0;
}
public OnPlayerEnterCheckpoint ( playerid ) {
    new rwep = random( 21 ) ;
    OnceWep = 1;
    if(OnceWep == 1) {
        switch ( rwep ) {
            case 0: GivePlayerWeapon ( playerid , 1, 100) ;
            case 1: GivePlayerWeapon ( playerid , 8, 100) ;
            case 2: GivePlayerWeapon ( playerid , 9, 100) ;
            case 3: GivePlayerWeapon ( playerid , 30, 100) ;
            case 4: GivePlayerWeapon ( playerid , 31, 100) ;
            case 5: GivePlayerWeapon ( playerid , 35, 100) ;
            case 6: GivePlayerWeapon ( playerid , 24, 100) ;
            case 7: GivePlayerWeapon ( playerid , 23, 100) ;
            case 8: GivePlayerWeapon ( playerid , 25, 100) ;
            case 9: GivePlayerWeapon ( playerid , 27, 100) ;
            case 10: GivePlayerWeapon ( playerid , 28, 100) ;
            case 11: GivePlayerWeapon ( playerid , 29, 100) ;
            case 12: GivePlayerWeapon ( playerid , 37, 100) ;
            case 13: GivePlayerWeapon ( playerid , 34, 100) ;
            case 14: GivePlayerWeapon ( playerid , 41, 100) ;
            case 15: GivePlayerWeapon ( playerid , 43, 100) ;
            case 16: GivePlayerWeapon ( playerid , 32, 100) ;
            case 17: GivePlayerWeapon ( playerid , 36, 100) ;
            case 18: GivePlayerWeapon ( playerid , 10, 100) ;
            case 19: GivePlayerWeapon ( playerid , 11, 100) ;
            case 20: GivePlayerWeapon ( playerid , 12, 100) ;
        }
    }
   
    return 1;
}

public OnPlayerLeaveCheckpoint ( playerid ) {
    OnceWep = 0;
    SetTimerEx("CantEnter",9000,0,"i",playerid);
    return 1;
}

public CantEnter ( playerid ) {
    GameTextForPlayer ( playerid , " ~r~ You can now ~n~~w~ Get more random weapon" , 6000 , 4 ) ;
    OnceWep = 1;
    return 1;
}
__________________
Visit www.pgagaming.net for interesting and dumb facts about gaming muahahah!
Kitten is offline   Reply With Quote
Old 25/04/2011, 03:34 AM   #2
BASITJALIL
Gangsta
 
Join Date: Mar 2010
Location: C:\WINDOWS\system32\BasitJalil.dll
Posts: 556
Reputation: 7
Default Re: Mystery Box

Awesome script
BASITJALIL is offline   Reply With Quote
Old 25/04/2011, 04:04 AM   #3
Kitten
High-roller
 
Kitten's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 2,356
Reputation: 249
Default Re: Mystery Box

Quote:
Originally Posted by BASITJALIL View Post
Awesome script
thanks.
__________________
Visit www.pgagaming.net for interesting and dumb facts about gaming muahahah!
Kitten is offline   Reply With Quote
Old 25/04/2011, 04:09 AM   #4
wheelman_WM
Huge Clucker
 
wheelman_WM's Avatar
 
Join Date: Jan 2011
Location: Sun
Posts: 403
Reputation: 0
Default Re: Mystery Box

Nice Good Job
wheelman_WM is offline   Reply With Quote
Old 25/04/2011, 04:44 AM   #5
Millionaire
Banned
 
Join Date: Apr 2011
Location: Los Santos => Groove Street
Posts: 232
Reputation: 10
Default Re: Mystery Box

Awesome work
Millionaire is offline   Reply With Quote
Old 25/04/2011, 04:46 AM   #6
Kitten
High-roller
 
Kitten's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 2,356
Reputation: 249
Default Re: Mystery Box

Quote:
Originally Posted by Millionaire View Post
Awesome work
Thanks
__________________
Visit www.pgagaming.net for interesting and dumb facts about gaming muahahah!
Kitten is offline   Reply With Quote
Old 25/04/2011, 07:07 AM   #7
Mr L
Huge Clucker
 
Mr L's Avatar
 
Join Date: Jan 2010
Posts: 326
Reputation: 7
Default Re: Mystery Box

Not bad, good job
Mr L is offline   Reply With Quote
Old 25/04/2011, 09:00 PM   #8
Kitten
High-roller
 
Kitten's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 2,356
Reputation: 249
Default Re: Mystery Box

thanks.
__________________
Visit www.pgagaming.net for interesting and dumb facts about gaming muahahah!
Kitten is offline   Reply With Quote
Old 29/05/2011, 05:44 AM   #9
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 4,120
Reputation: 904
Default Re: Mystery Box

pawn Code:
new OnceWep = 0;

Is this applying for all players once the players in?

Cant you just make it for a single player?

Cool script anyway.
__________________

192.169.82.202:7777 - An awesome CnR server consisting of doozy features! Come, we have players!


Lorenc_ is offline   Reply With Quote
Old 29/05/2011, 11:47 AM   #10
Skidmarks
Big Clucker
 
Join Date: Mar 2011
Posts: 76
Reputation: 0
Default Re: Mystery Box

Coul use MoveObject (Random gunf loats up out of box) << Like cod :P
Skidmarks is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Assassin's Escape v0.11 (RP/DM/Mystery, 20 minute rounds) Joe Staff Gamemode Scripts 7 01/09/2012 01:34 AM
Mystery weapon appears Rachael Bug Reports 5 29/08/2010 08:18 AM
Fatal Errors, Mystery to All [HELP] Delphinus Help Archive 7 30/06/2009 06:45 PM


All times are GMT. The time now is 10:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.