Author Topic: Making a chainsaw!  (Read 4855 times)

0 Members and 1 Guest are viewing this topic.

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Making a chainsaw!
« on: February 05, 2013, 09:04:52 pm »
Hello! Today after school I've made new chainsaw completing script. I mean that you can now make chainsaw from materials you will find.
Okay so, first to all I'd like to explain here the "recipe". YEAH

Chainsaw:
1. Cutting equipment;
2. Scooter engine;
3. Frame
4. Fueltank;
5. Gears package.

Use "!demountengine" to demount the engine when you are driving Faggio. When u will find all these "ingredients" u can make a chainsaw using "!makechainsaw". BUT this is not the end because your chainsaw won't work without fuel like you when you hungry. So then u go to the nearest gas station and fill it for $10 (I made $10 cuz I think it's not too much as for VCMP player =P)

Okay, here is code:

put in the beginning:
[pawn]
new cuttingequipment[MAX_PLAYERS];
new gear[MAX_PLAYERS];
new framewithhandles[MAX_PLAYERS];
new fueltank[MAX_PLAYERS];
new engine[MAX_PLAYERS];
new madechainsaw[MAX_PLAYERS];
new filledtank[MAX_PLAYERS];
[/pawn]

put in public OnGameModeInit():
[pawn]
    AddStaticVehicle(192, 112.35513, -1150.53576, 31.30939, 0, 0, 0);//must be the first vehicle, I mean the first in the list
    AddStaticVehicle(192, 114.86677, -1150.51501, 31.30939, 0, 0, 0);//must be the second vehicle =P
    AddStaticPickup(1, 346, -1243.28869, 83.49330, 11.87996);
    AddStaticPickup(2, 346, -974.83831, -693.88696, 11.52398);
    AddStaticPickup(3, 346, -1064.71887, 344.63726, 11.26404);
    AddStaticPickup(4, 346, -1190.05808, -304.88229, 11.38048);
    AddStaticPickup(5, 578, 43.34131, -1055.93249, 10.46328);
[/pawn]

put in public OnPlayerText(playerid, text[]):
[pawn]
{
   if(strcmp(text, "!demountengine", true)==0)
   {
      if(IsPlayerInAnyVehicle(playerid))
      {
         new vehicleid = GetPlayerVehicleID(playerid);
         if(vehicleid==1 || vehicleid==2)
         {
            if(engine[playerid]==0)
            {
                 SendClientMessage(playerid, 0x00C80CAA, "The engine has been demoted!");
                 KillVehicleEngine(vehicleid);
                 engine[playerid]+=1;
            }
            else if(engine[playerid]==1)
            {
                SendClientMessage(playerid, 0xFF0000AA, "You already have an engine!");
                }
            return 0;
         }
         else
         {
             SendClientMessage(playerid, 0xFF0000AA, "You are not driving faggio!");
         }
         return 1;
      }
      else
      {
          SendClientMessage(playerid, 0xFF0000AA, "You are onfoot!");
      }
      return 1;
   }
   else if(strcmp(text, "!makechainsaw", true)==0)
   {
      if(engine[playerid]>=1 && cuttingequipment[playerid]>=1 && gear[playerid]>=1 && framewithhandles[playerid]>=1 && fueltank[playerid]>=1)
      {
          SendClientMessage(playerid, 0x00C80CAA, "You have made chainsaw from materials. Go to the gas station to fill it.");
          madechainsaw[playerid]=1;
          engine[playerid]-=1;
          cuttingequipment[playerid]-=1;
          gear[playerid]-=1;
          framewithhandles[playerid]-=1;
          fueltank[playerid]-=1;
      }
      else
      {
          SendClientMessage(playerid, 0xFF0000AA, "You don't have enough materials!");
      }
      return 1;
   }
   return 1;
}
[/pawn]

put in public OnPickedUp(pickupid, playerid):
[pawn]
{
   if(pickupid==1)
   {
       cuttingequipment[playerid]+=1;
       GameTextForPlayer(playerid, "~o~Cutting equipment ~h~has been found!");
   }
   else if(pickupid==2)
   {
        gear[playerid]+=1;
       GameTextForPlayer(playerid, "~o~Gears package ~h~has been stolen!");
   }
   else if(pickupid==3)
   {
       framewithhandles[playerid]+=1;
       GameTextForPlayer(playerid, "~o~Frame ~h~has been found!");
   }
   else if(pickupid==4)
   {
       fueltank[playerid]+=1;
       GameTextForPlayer(playerid, "~o~Fuel tank ~h~has been found!");
   }
   else if(pickupid==5)
   {
      if(madechainsaw[playerid]==1)
      {
         new pmoney = GetPlayerMoney(playerid);
         if(pmoney>=10)
         {
                GameTextForPlayer(playerid, "~h~Your chainsaw fuel tank has been filled for ~t~$10");
                SetPlayerWeapon(playerid, 11, 1);
                filledtank[playerid]=1;
                madechainsaw[playerid]-=1;
         }
         else
         {
                SendClientMessage(playerid, 0xFF0000AA, "You need atleast ~t~$10 to fill your chainsaw fuel tank!");
            }
         return 1;
      }
      else
      {
          GameTextForPlayer(playerid, "~h~You need to equip ~o~chainsaw first!");
      }
      return 1;
   }
   return 1;
}
[/pawn]

I hope you will understand the making process, and I also hope u will be CAREFUL, not like this Guy:


HERE are screenshots with materials locations:












Comments pls!
« Last Edit: February 06, 2013, 06:05:49 pm by NeskWriter »


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Making a chainsaw!
« Reply #1 on: February 06, 2013, 12:30:48 am »
lolx
LOOOOOOOOOLX
 :-[
 ??? :o
 :)
hahaha
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Making a chainsaw!
« Reply #2 on: February 06, 2013, 08:46:58 pm »
Here is the map with 6 tags (red dots)


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Making a chainsaw!
« Reply #3 on: February 06, 2013, 10:18:24 pm »
lol you are making chainsaw to cut your hand
lol
loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooolllllllllllllllllllll
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
:D
GOOD TOPIC 100 LIKES
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline [KB]ViceMania

  • Wiseguy
  • **
  • Posts: 53
  • Mega War server administrator
    • View Profile
Re: Making a chainsaw!
« Reply #4 on: February 10, 2013, 03:29:01 am »
 :o :o NICE GOOD JOB! :)

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Making a chainsaw!
« Reply #5 on: February 10, 2013, 12:16:09 pm »
:o :o NICE GOOD JOB! :)

thx, I'd like to make the same system (collecting materials, completing them) but with grenade. Should I do this?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: Making a chainsaw!
« Reply #6 on: February 11, 2013, 10:59:59 am »
This is Saveable When Player Disconnect And Re-Connect The Material Will Be Removed Or not ?
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Making a chainsaw!
« Reply #7 on: February 11, 2013, 05:49:43 pm »
This is Saveable When Player Disconnect And Re-Connect The Material Will Be Removed Or not ?

No, materials will NOT be removed if u got reg sys on your server


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline [Saint]

  • Made Man
  • ***
  • Posts: 126
  • Pawn scripting for SA:MP and VC:MP
    • View Profile
    • vk.com/vicecitymultiplayer
Re: Making a chainsaw!
« Reply #8 on: February 14, 2013, 02:58:17 am »
NeskWriter, nice job man, continue work for upgrade your skills  ;) (на самом деле я вообще не понял даже для чего это :D)



Russian Сommunity

Вступайте в группу: vk.com/vicecitymultiplayer

My profile on sa-mp.com

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Making a chainsaw!
« Reply #9 on: February 14, 2013, 09:03:42 am »
NeskWriter, nice job man, continue work for upgrade your skills  ;) (на самом деле я вообще не понял даже для чего это :D)

dank u man, I'll make another systems in da future. (Это сис, которая позволяет собирать материалы и делать из них бензопилу, которой можно рубить людей)


-Funniest quotes-

Quote from: asad3man
i cant able to understand