SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] [ MIC ] - [ Make It Comfortable ] - [ Redefined ] (https://forum.sa-mp.com/showthread.php?t=12909)

Kapil 19/09/2007 07:06 PM

[ MIC ] - [ Make It Comfortable ] - [ Redefined ]
 

  • What
    MIC aka Make It Comfortable is a set of includes which provides more
    features to your scripts and helps you making them comfortably.
_________________________________________________

  • In It


    • [ steam ]

      Description:
      steam.inc' includes object steamer, map icon steamer,
      and a checkpoint steamer.

      Principle:
      It maintains the objects and map icons such that they show
      up only if a player is close enough using low draw distance
      for each player and element.

      For checkpoints the steamer checks the closest checkpoint
      to a player and sets them according to it.

      The steamer updates itself every 1/60th part of a minute.

      Functions / Callbacks:
      AddStaticIcon(Float:x,Float:y,Float:z,markertype,c olor);
      AddStaticObject(model,Float:x,Float:y,Float:z,Floa t:rx,Float:ry,Float:rz);
      CreateCheckpoint(Float:x,Float:y,Float:z,Float:siz e);
      DestroyCheckpoint(checkpointid);
      ShowCheckpointForPlayer(playerid,checkpointid);
      HideCheckpointForPlayer(playerid,checkpointid);
      ShowCheckpointForAll(checkpointid);
      HideCheckpointForAll(checkpointid);

      Must Note:
      More the number of objects less should be the draw distance.

      Download:

      http://solidfiles.com/info_imgs/301.jpg

    • [ struct ]

      Description:
      'struct.inc' has a set of functions which makes
      it easy to store and load different types of data.

      Principle:
      It uses a file storage system which enables a server
      to have unlimited subnode and unlimited nodes.

      Functions / Callbacks:
      setDS(...);
      getDS(tostring[],...);
      isDS(...);

      Must Note:
      Though you a node can have unlimited subnodes,
      you might limit them as a string as a max length
      of only 256.

      Download:

      http://solidfiles.com/info_imgs/418.jpg
    • [ crash ]

      Description:
      'crash.inc' is sort of extension with which
      you can easily find when, what, and why did
      your server crashes.

      Principle:
      It converts a script into a format such that
      it can detect every function which is running
      and logs it into a text file.

      Functions / Callbacks:
      none

      Must Note:
      - When you are using it, all the server functions
      and callbacks are logged in to a file 'log.txt'.
      You can find that file in your scriptfiles

      Download:

      http://solidfiles.com/info_imgs/162a.jpg

    • [ callback ]

      Description:
      'callback.inc' are a set of usefull callbacks which
      might be usefull for certain types of gamemodes.

      Principle:
      It assumes all the money given by the player as
      one variable and the money player has currently
      as another variable.
      If the amount of money
      player has is less than the money server
      has given to the player, then that means that the
      player has spent the money on certain places.
      if the amount of money player has is
      greater than the money server has given to
      the player then that means that the player has
      recived money ingame somehow.

      Functions / Callbacks:
      OnPlayerUseTransfender(playerid,amountspent)
      OnPlayerUsePaynSpray(playerid,amountspent)
      OnPlayerEatFood(playerid,amountspent)
      OnPlayerDrinkSprunk(playerid,amountspent)
      OnPlayerUseAmmuNation(playerid,amountspent)
      OnPlayerUseCasino(playerid,amountspent)
      OnPlayerHackMoney(playerid,money)

      Must Note:
      You must not use any filterscript, if you run
      a filterscript makesure it doesnt use GivePlayerMoney
      or ResetPlayerMoney functions.

      Download:

      http://solidfiles.com/info_imgs/29d.jpg
_________________________________________________
  • Installation

    - Once you have downloaded the file you wanted, you will need to extract them into your 'Server/pawno/include/'.
    - Open, your gamemode or the script you to install and add '#include <what ever u have downloaded>' at the top.
    - Compile It, to makesure they are compatible with your gamemode( If it doesnt compile post the errors in this topic ).

    Note: When you have downloaded more than one of 'MIC Redifined ' your includes
    should follow this pattern.

    #include <struct>
    #include <callback>
    #include <steam>
    #include <crash>
_________________________________________________
  • Examples

    [ struct ]

    setDS(playerName,WeaponID_string,Ammos_string);

    ammos = strval( getDS(playerName,WeaponID_string) );

    if(isDS(houseID,"Tenents",playerName))


    [ callback ]

    public OnPlayerUsePaynSpray(playerid,amountspent)
    {
    GivePlayerMoney(playerid,amountspent); // in this case, pay n sprays are free
    }



_________________________________________________
_________________________________________________
_________________________________________________[*]Affiliates
  • MIC -
    • 'Struct' - Save / Load data with flexible features.
    • 'Steam' - Stream map icons, objects, checkpoints at once.
    • 'Crash' - Detects when, why, who and how your server crashed.
    • 'Callback' - Triggers Single-Player events into your script.
  • CMN - Stop defending cheaters, its time to attack them.
  • KIHC - Build houses in the most easiest way ever possible.
  • MD - High quality user interferenced ingame map editing tool.

kc 19/09/2007 07:21 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
sweeeet!!! That sounds awesome. Downloading now...

nate660 19/09/2007 07:30 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
OMG!!! KIBC i was waiting on that for 5 weeks now thanks alot kapil your the best

Alejandro 19/09/2007 07:36 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
oh this is dope... i gotta scope this out. thanks kapil.

Kapil 19/09/2007 07:58 PM

Usage
 
------------------------------------------------------------------------

SetPlayerCheckPoint(playerid,Float:x,Float:y,Float :z,Float:size)

Float:x - x co-ordinate of the checkpoint position.
Float:y - y co-ordinate of the checkpoint position.
Float:z - z co-ordinate of the checkpoint position.

returns - checkpointid.

E.G
new cpid = SetPlayerCheckPoint(playerid,134.244,323.4554.64.4 44);

-------------------------------------------------------------------

strcut(string[],substring[])


string - the string which u want to remove a substring.
substring - the part of string which u want to remove.

E.G
strcut(string,"king");

-------------------------------------------------------------------

fline(File:handle,line)

File:handle - the file handler which u have used to open the file.
line - the line number which you want to seek.

E.G
fline(handler,23);

--------------------------------------------------------------------

AddStaticHouse(Float:x,Float:y,Float:z,Float:ix,Fl oat:iy,Float:iz,ii)

Float:x - the x co-ordinate of the house.
Float:y - the y co-ordinate of the house.
Float:z - the z co-ordinate of the house.
Float:ix - the ix co-ordinate of interior of the house.
Float:iy - the iy co-ordinate of interior of the house.
Float:iz - the iz co-ordinate of interior of the house.
ii - the interior id of interior of the house.

returns - houseid

E.G
AddStaticHouse(2312.233,233.323,3245.54234,43.4656 ,235.2214,123.5668,4);

---------------------------------------------------------------------

AddStaticBiz(Float:x,Float:y,Float:z,Float:ix,Floa t:iy,Float:iz,ii)

Float:x - the x co-ordinate of the biz.
Float:y - the y co-ordinate of the biz.
Float:z - the z co-ordinate of the biz.
Float:ix - the ix co-ordinate of interior of the biz.
Float:iy - the iy co-ordinate of interior of the biz.
Float:iz - the iz co-ordinate of interior of the biz.
ii - the interior id of interior of the biz.

returns - bizid

E.G
AddStaticBiz(2312.233,233.323,3245.54234,43.4656,2 35.2214,123.5668,4);

--------------------------------------------------------------------

EnableBlockAmmu(toggle)

toggle - 1 if yes , 0 if no

E.G
EnableBlockAmmu(1);

---------------------------------------------------------------------

MakeAmmu(slot1,slot2,slot3,slot4,slot5,slot6,slot7 )

slot1 - the first menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot2 - the second menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot3 - the third menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot4 - the four menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot5 - the five menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot6 - the six menu row in ammu-nation menu.( 1 if enable, 0 if disable)
slot7 - the seven menu row in ammu-nation menu.( 1 if enable, 0 if disable)

returns - ammuid

E.G
MakeAmmu(1,1,1,1,1,0,0)

-------------------------------------------------------------

SetWeaponCost(ammuid,weaponid,cost)

weaponid - It can be determined by xy
where x is the row in the main ammu menu
and y is the row in the second ammu menu.
E.G
SetWeaponCost(ammu1,11,435);

---------------------------------------------------------------

EnableChatSystem(toggle)

toggle - 1 if yes, 0 if no.

E.G
EnableChatSystem(1);

---------------------------------------------------------------

SavePlayer(playerid,info[],value[])

info - is the information about the player.
value - is the value for that particular informatin.

E.G
SavePlayer(playerid,"Health","12.55");

---------------------------------------------------------------

LoadPlayer(playerid,info[],value[])

info - is the information about the player.
value - is the value for that particular informatin.

returns - 1 if info found, 0 if not found.

E.G
LoadPlayer(playerid,"Health",string);

---------------------------------------------------------------

SaveProperty(name[],info[],value[])

name - name of the property.
info - is the information about the player.
value - is the value for that particular informatin.

E.G
SaveProperty("Deaths","Shreyon","3");

---------------------------------------------------------------

LoadProperty(name[],info[],value[])

name - name of the property.
info - is the information about the player.
value - is the value for that particular informatin.

returns - 1 if found, 0 if not found.

E.G
LoadProperty("Deaths,"Shreyon",string);


-------------------------------------------------------------------

ToggleClock(toggle)

toggle - 1 if yes, 0 if no.

E.G
ToggleClock(1);

-------------------------------------------------------------------

EnableFuelSystem(toggle)

toggle - 1 if yes, 0 if no.

E.G
EnableFuelSystem(1);

-------------------------------------------------------------------

nate660 19/09/2007 08:03 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
Are you serious an addstatichouse thats sweet Well all and all i think its one of the greatest releases i have seen for a while

Alejandro 19/09/2007 08:08 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
how does the addstatichouse work? like yea.. how does it work?

El0vric 19/09/2007 08:15 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
Sweet... Will try it.

Kapil 19/09/2007 08:22 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
Quote:

Originally Posted by Alejandro
how does the addstatichouse work? like yea.. how does it work?

I am creating a page on wiki, please be patient, I will give u the link.

EDIT: Click ME

Pentel 19/09/2007 09:21 PM

Re: INC] Make It Comfortable - [ M.I.C ] version 0.1 BETA
 
Thanks a lot! Great :). Are you ever going to add something like in KIHC with /build :)?


All times are GMT. The time now is 03:36 PM.

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