Author Topic: Need help in SQ server.  (Read 7471 times)

0 Members and 2 Guests are viewing this topic.

Offline Omair

  • Street Thug
  • *
  • Posts: 26
    • View Profile
Need help in SQ server.
« 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.

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Need help in SQ server.
« Reply #1 on: August 28, 2014, 04:40:53 pm »

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: Need help in SQ server.
« Reply #2 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...
« Last Edit: October 01, 2014, 05:15:01 pm by NE.Restricted »
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline Spidey

  • Street Thug
  • *
  • Posts: 37
  • iam good scripter and iam computer genuis too
    • View Profile
    • Fight gangwar server
Re: Need help in SQ server.
« Reply #3 on: September 26, 2014, 01:08:56 pm »
hey tell me how to make happy 1 minute for vccnr with pawn?

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Need help in SQ server.
« Reply #4 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
« Last Edit: September 26, 2014, 02:07:25 pm by Honey. »

Offline Spidey

  • Street Thug
  • *
  • Posts: 37
  • iam good scripter and iam computer genuis too
    • View Profile
    • Fight gangwar server
Re: Need help in SQ server.
« Reply #5 on: October 01, 2014, 08:18:24 am »
is this for pawn

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Need help in SQ server.
« Reply #6 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