VC:MP 0.3 > mIRC/pawn Scripting

Need help in SQ server.

(1/2) > >>

Omair:
Hello,

           Guys can you tell me how can i make happy 1 minute in VcCnR ?

Q : - For robbers can you give me a script that should work and say after every five minutes :
"Happy one minute for robbers, Rob any shop and get money in $10000-50000."?

Q:- For cops can you give me a script that should work and say after every 3 minutes :
"Happy 2 minutes for cops, Arrest any wanted criminal and get 30 copskills!"

Please help.....
Thanks,
With kind regards,
Omair.

MatheuS:
Better you go there.

http://vcmp.liberty-unleashed.co.uk/forum/

NE.Restricted:

--- Quote from: Omair on August 28, 2014, 12:29:02 pm ---Hello,

           Guys can you tell me how can i make happy 1 minute in VcCnR ?

Q : - For robbers can you give me a script that should work and say after every five minutes :
"Happy one minute for robbers, Rob any shop and get money in $10000-50000."?

Q:- For cops can you give me a script that should work and say after every 3 minutes :
"Happy 2 minutes for cops, Arrest any wanted criminal and get 30 copskills!"

Please help.....
Thanks,
With kind regards,
Omair.

--- End quote ---
I don't know much about sq scripting but heres the untested basic code

--- Code: ---function onScriptLoad()
{
NewTimer("Happyminute",5000,0);
//whatever
}
function Happyminute()
{
ClientMessageToAll("Happy one minute rob any store and whatever...",0,255,127);
//something to set the happyminutevar variable that you should create to true
}
--- End code ---
guess thats how much I can help...

Spidey:
hey tell me how to make happy 1 minute for vccnr with pawn?

Honey.:

--- Quote from: Spidey on September 26, 2014, 01:08:56 pm ---hey tell me how to make happy 1 minute for vccnr with pawn?

--- End quote ---

The main part of Happy One Minute is to set variables to the amount of you want and then change them back once your Happy One Minute is over.Check the basic code provided by NE.


--- Code: ---function onScriptLoad()
{
NewTimer("Happyminute",600000,0); // Once every 10 min
//whatever
}
function Happyminute()
{
ClientMessageToAll("Happy one minute rob any store and whatever...",0,255,127);
//something to set the happyminutevar variable that you should create to true
// a basic example of setting variables:
// suppose that You store your pickup data in a Database.Then update it like that
// You must add the new amount at  Robbing ='" + here + "' 
// Store the previous data so we can set it back again later.
QuerySQL( db, "Select Robbing FROM Pickups WHERE rowid LIKE '" + pickup.ID + "'");
status[player.ID].prev = GetSQLColumnData( q, 2 ); /// 2 is the data table
QuerySQL(db,"UPDATE Pickups SET Robbing='" +  + "' WHERE rowid LIKE '" + pickup.ID + "'");
NewTimer( "SetBack", 60000, 1 );
}

function onPickupPickedUp( player, pickup )
{
if ( pickup.Model == 408 )
{
ClientMessgeToAll( player.Name + " is robbing a store near " + GetDistrictName( player.Pos.x, player.Pos.y ), 255,255,0 );
ClientMessage( "You Robbed : " + a, player,255,255,0 );
local add = player.Cash + a;
player.Cash+= add;
}
}

--- End code ---



Above was a basic code which is not tested so there may be Syntax or Parameter error.You are not supposed to copy that code.You should learn from it.The example will most probably wont work bec its not complete but i never made it to be used.This was just for your help & I tried making VccnR once but after a while realized I shouldn't make it because this wasn't my original so i stopped.I suggest you the same :) GL

Navigation

[0] Message Index

[#] Next page

Go to full version