20.01.2008, 18:25
..r u trying to compile it?
..zomg
..zomg
Quote:
Originally Posted by guide
I liked (better to say loved) this include ,so i decided to make guide for newbies:
1)Download this include. 2)Put/copy it in your serverfolder/pawno/includes folder. 3)Go to your gamemode. 4)At the bottom add: "#include <aHouse>" . 5)At "OnGameModeInit()" add: AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Cost, Sell, Interior) where: houseid - id of your house (starts from "0" ) Float:iconX - x coordinate of OUTSIDE Float:iconY, - y coordinates of OUTSIDE Float:iconZ, - z coordinates of outside Float:interiorX, - x coordinates of INSIDE Float:interiorY, - y coordinates of inside Float:interiorZ - z coordinates of inside Cost - house buying price Sell - selling price Interior - interior of house inside You can find interior ID\'s here: http://wikitmp.sa-mp.com/index.php/InteriorIDs 6)under OnPlayerPickupPickup(playerid,pickupid) add: GetHouseStats(playerid, pickupid); 7)under OnPlayerCommandText() add: dcmd(buy,3, cmdtext); dcmd(sell,4, cmdtext); dcmd(enter,5, cmdtext); dcmd(exit,4, cmdtext); A the bottom of the Gamemode add: #define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1 9)Commands that will work: /buy /sell /enter /exit 10) add AddHouse(stuff here) before CreatePickup and AddStaticPickup 11) Open your aHouse include file and at first lines you will see: //---------------------------- //---------------------------- #define HOUSES [xXx] //---------------------------- //---------------------------- Change xXx to your house count ! 12) Woualla ! your 1st house is done ,no go testing and have fun! |