03.07.2013, 17:59
(
Последний раз редактировалось Youarex; 24.10.2013 в 12:56.
)
Block Pandemonium (Minigames)
This is probably the most useless include you can find. It's very simple one, giving you the tools to create minigames on a 'Block Pandemonium' base, whatever you can come up with
Example:
[ame]http://www.youtube.com/watch?v=gzRQiSBik1k[/ame]
Download:
block.inc - Pastebin
Callbacks
Functionspawn Код:/*
OnPlayerCaptureBlock:
Called when a player captures a block.
Parameters:
playerid - The player that captured the block.
blockid - The block that was captured.
Returns:
Doesn't return a specific value.
*/
public OnPlayerCaptureBlock(playerid, blockid)
{
return 1;
}
pawn Код:/*
Arena_Create:
Creates the arena (132 objects).
Parameters:
Float:x - The X coordinate to create the arena at.
Float:y - The Y coordinate to create the arena at.
Float:z - The Z coordinate to create the arena at.
Returns:
Doesn't return a specific value.
*/
Arena_Create(Float:x, Float:y, Float:z);
/*
Arena_Destroy:
Destroys the arena.
Parameters:
No parameters.
Returns:
Doesn't return a specific value.
*/
Arena_Destroy();pawn Код:/*
SetBlockColor:
Changes the color of the block.
Parameters:
blockid - The block to change the color of.
color - The color to set, as an integer or hex (ARGB).
Returns:
Doesn't return a specific value.
*/
SetBlockColor(blockid, color);
/*
GetBlockColor:
Returns the color of the block.
Parameters:
blockid - The block you want to know the color of.
*/
GetBlockColor(blockid);Loopspawn Код:/*
SetBlockUniqueID
Sets the unique ID to the block.
Parameters:
blockid - The block to change unique ID of (as an integer).
uniqueid - The unique ID to be set for the block.
Returns:
Doesn't return a specific value.
*/
SetBlockUniqueID(blockid, uniqueid);
/*
SetBlockUniqueID
Returns the unique ID of the block.
Parameters:
blockid - The block you want to know the unique ID of.
*/
GetBlockUniqueID(blockid);
pawn Код:/*
blocks:
You can use this to loop through all blocks.
Variables:
Declare a new local variable. (E.g. 'i' or 'blockid')
*/
blocks(i)
{
}