SA-MP Forums

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

Closed Thread
 
Thread Tools Display Modes
Old 03/11/2010, 11:11 PM   #11
willsuckformoney
High-roller
 
willsuckformoney's Avatar
 
Join Date: Dec 2009
Posts: 1,505
Reputation: 65
Default Re: Script Request Thread #5

LarzI that just crashed my pawno.
__________________
Fuck the system.
willsuckformoney is offline  
Old 05/11/2010, 07:01 PM   #12
ZamaXor
Big Clucker
 
Join Date: Jul 2010
Posts: 109
Reputation: 0
Default Re: Script Request Thread #5

Can someone make me a random last man standing system?

example:

every 10 minutes server will start a random fight system "random fight started. type /rf join to join random fight".
It will take 30 seconds and then the players that typed /rf join will spawn inside a big interior. Then after the players spawned it will say in chat ''Random fight started .(how many players joined)10 practisians.'' Then the players will fight and the last alive will win 5000 and spawn.
Remove anti-team kill teammates.
ZamaXor is offline  
Old 05/11/2010, 08:51 PM   #13
Kazzy10
Little Clucker
 
Join Date: Sep 2010
Posts: 19
Reputation: 0
Default Re: Script Request Thread #5

Hello i need script /takegun
Guns m4 , ak47 , deagle , mp5
tnx a lot
on this command player can take these guns for free
Kazzy10 is offline  
Old 05/11/2010, 08:54 PM   #14
Kazzy10
Little Clucker
 
Join Date: Sep 2010
Posts: 19
Reputation: 0
Default Re: Script Request Thread #5

tnx again
Kazzy10 is offline  
Old 05/11/2010, 09:51 PM   #15
Agent*
Little Clucker
 
Agent*'s Avatar
 
Join Date: Oct 2010
Posts: 11
Reputation: 0
Default Re: Script Request Thread #5

Quote:
Originally Posted by ThunD3r View Post
Hi , i`m searching for a script that can make a new job , Prison Guard ,
i want that job to have some commands:
/on ( Makes the player on duty and teleports him at the prison )
/off ( Makes the player off duty and teleports him to his house / normal spawn place )
/Weapons ( Only when he`s on duty : gives him a sniper and a M4a1 )
/Alert [playername/id] ( Announces the server that a prissoner has escaped )
And also if possible , at payday , depending on how many minutes he guarded the prison to get a amount of money
10 minutes = 10.000 $
20 minutes = 20.000 $
30 minutes = 40.000 $
50 minutes = 50.000 $
If possible please help me please Thank You
You have to do the payday by yourself, just make a variable that stores the minutes.

Requirements:
DCMD, sscanf
A bit PAWN knowledge

To do:
Add the follow lines below OnPlayerCommandText:
Code:
dcmd(on, 2, cmdtext);
dcmd(off, 3, cmdtext);
dcmd(weapons, 7, cmdtext);
dcmd(alert, 5, cmdtext);
Script:
pawn Code:
dcmd_on(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "You are now a Prison Guard");
    SetPlayerPos(playerid, prisonx, prisony, prisonz);
    SetPVarInt(playerid, "Guard", 1);
}

dcmd_off(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "You are no longer a Prison Guard");
    SpawnPlayer(playerid);
    SetPVarInt(playerid, "Guard", 0);
}

dcmd_weapons(playerid, params[])
{
    if(!(GetPVarInt(playerid, "Guard") == 1)) return SendClientMessage(playerid, 0xFFFFFFFF, "Sorry, you must be a Prison Guard if you want weapons");
    SendClientMessage(playerid, 0xFFFFFFFF, "[PRISON]: You have received 250 sniper bullets and 1500 M4 bullets");
    GivePlayerWeapon(playerid, 31, 1500);
    GivePlayerWeapon(playerid, 34, 250);
}

dcmd_alert(playerid, params[])
{
    new id;
    if(sscanf("u", id)) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /alert [playername/id]");
    else
    {
        GameTextForAll("~w~A ~r~prisoner ~w~is escapped!", 3000, 3);
    }
}
Agent* is offline  
Old 07/11/2010, 07:20 PM   #16
Lilcuete
Gangsta
 
Join Date: Sep 2009
Posts: 571
Reputation: 1
Default Re: Script Request Thread #5

nvm............

Last edited by Lilcuete; 15/11/2010 at 09:44 PM.
Lilcuete is offline  
Old 08/11/2010, 11:39 PM   #17
Febreeze
Little Clucker
 
Join Date: Jul 2010
Posts: 2
Reputation: 0
Default Re: Script Request Thread #5

Ok I would like two things the first one is easy, the second one is pretty complex.

1. Not sure if this is possible, but make it to where stoplights turn green if a emergency vehicle is moving through with their sirens on. So the lights that the direction the cop is going turn green and the other turn red. Not sure if this is even possible, but it would be cool.


2. Number two is car bugs. A player has to buy a reciever and a bug from a 24/7 store. When the player gets in the car they type /placebug then the bug is placed. If they don't have a reciever though the bug doesnt work. If they sucessfully place the bug then a red dot appears on the map of where the car is. If the person wants to take the bug out of the car they do /removebug. Now if a person doesn't want to be followed they can do /checkbugs and then it will display if there are any bugs in the car or not. If any are found they are removed and the dot disappears from the bug placers map. Also if it is possible the bug placer can listen in on the conversations in the bugged car.
Its a complex idea, if you need a better description I can give you one.
Febreeze is offline  
Old 09/11/2010, 01:10 AM   #18
Ritchie999
Gangsta
 
Join Date: Aug 2009
Location: Republic Of Ireland
Posts: 723
Reputation: 3
Default Re: Script Request Thread #5

Quote:
Originally Posted by Kazzy10 View Post
Hello i need script /takegun
Guns m4 , ak47 , deagle , mp5
tnx a lot
on this command player can take these guns for free
Well, M4 and AK47 are both in the same slot class So you can't have both
But

pawn Code:
if(!strcmp(cmdtext, '/takegun', true))
    {
       GivePlayerWeapon(playerid, 31, 9999);
       GivePlayerWeapon(playerid, 29, 9999);
       GivePlayerWeapon(playerid, 24, 9999);
        return 1;
    }

OR For an AK47

pawn Code:
if(!strcmp(cmdtext, '/takegun1', true))
    {
       GivePlayerWeapon(playerid, 30, 9999);
       GivePlayerWeapon(playerid, 29, 9999);
       GivePlayerWeapon(playerid, 24, 9999);
        return 1;
    }
__________________
Ritchie999 is offline  
Old 09/11/2010, 02:16 AM   #19
marinov
Gangsta
 
marinov's Avatar
 
Join Date: Oct 2010
Location: San Andreas
Posts: 597
Reputation: 5
Default Re: Script Request Thread #5

hello, I see a lot of people asking for help to make a team balancer, and I'm one of them, I would appreciate if you guys help me/others by showing us a code.
__________________
http://mczombiecom.co.nr/
marinov is offline  
Old 09/11/2010, 09:52 AM   #20
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,440
Reputation: 2601
Default Re: Script Request Thread #5

That depends entirely on how you make your teams. Just keep a running total of how many people are in each team then when someone joins the server move them on to the team with the least people. If you want an aggressive team balancer which moves people when people leave you will need to randomly select another player in OnPlayerDisconnect, set them to respawn with a new skin via SetPlayerSpawnInfo then kill them.
Y_Less is offline  
Closed Thread

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
Re: Script Request Thread #3 clean180ollie Help Archive 879 05/01/2010 05:08 PM
Script Request Thread #2 Dol Help Archive 807 28/07/2009 09:09 AM
Script Request Thread kaisersouse Help Archive 1112 20/03/2009 11:15 AM


All times are GMT. The time now is 02:03 AM.


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