Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Omair on August 28, 2014, 12:29:02 pm

Title: Need help in SQ server.
Post by: 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.
Title: Re: Need help in SQ server.
Post by: MatheuS on August 28, 2014, 04:40:53 pm
Better you go there.

http://vcmp.liberty-unleashed.co.uk/forum/
Title: Re: Need help in SQ server.
Post by: NE.Restricted on August 28, 2014, 11:20:13 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.
I don't know much about sq scripting but heres the untested basic code
Code: [Select]
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
}
guess thats how much I can help...
Title: Re: Need help in SQ server.
Post by: Spidey on September 26, 2014, 01:08:56 pm
hey tell me how to make happy 1 minute for vccnr with pawn?
Title: Re: Need help in SQ server.
Post by: Honey. on September 26, 2014, 01:57:49 pm
hey tell me how to make happy 1 minute for vccnr with pawn?

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: [Select]
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;
}
}



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
Title: Re: Need help in SQ server.
Post by: Spidey on October 01, 2014, 08:18:24 am
is this for pawn
Title: Re: Need help in SQ server.
Post by: Honey. on October 01, 2014, 01:23:49 pm
That code of for SQuirrel and as i stated above.The code will NOT work.It will only give you the basics