AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blockmaker help. (https://forums.alliedmods.net/showthread.php?t=196794)

blo0d_p3ople 09-25-2012 15:24

Blockmaker help.
 
Hello to all , sorry for my bad english but im from Bulgaria.I want help, becouse i have a blockmaker and i want to add "Elevator block".Started to coding it but when you step on the bouncing platform[ Elevator] he stop bouncing... i want to ask how can i fix it when player steps on it to go up-down. Please help me with this problem. :) I want to say that i use the code from a blockmaker with [Bouncing Death] and remake it to a [Bouncing Platform].

.Dare Devil. 09-25-2012 15:58

Re: Blockmaker help.
 
Read this: http://forums.alliedmods.net/showthread.php?t=107153
Really if you want something about blockmaker then post this here http://forums.alliedmods.net/forumdisplay.php?f=12

blo0d_p3ople 09-25-2012 16:51

Re: Blockmaker help.
 
Okey man, i will post it there.

blo0d_p3ople 09-26-2012 16:46

Re: Blockmaker help.
 
ActionPlatformBounce(id)
{
if (!get_user_godmode(id))
{
{
message_begin(MSG_ONE, gmsgScreenFade, {0,0,0}, id);
write_short(4096*1); // Duration
write_short(4096*1); // Hold time
write_short(4096); // Fade type
write_byte(0); // Red
write_byte(0); // Green
write_byte(0); // Blue
write_byte(200); // Alpha
message_end();
}
}
}
public bounce_platform1(iEntity)
{
if ( IsBlock(iEntity) )
{
new block_type = entity_get_int(iEntity, EV_INT_body);
if(pev_valid(iEntity) && block_type == BOUNCE_PLATFORM1)
{

static property[5];
GetProperty(iEntity, 1, property);
if(pev(iEntity, pev_flags)&FL_ONGROUND)
{
new Float:velocity[3];
velocity[2] = str_to_float(property);
set_pev(iEntity, pev_velocity, velocity);
}
set_task(0.1, "bounce_platform1", iEntity);
}
}
}



This is the code.What i do wrong... ?


All times are GMT -4. The time now is 08:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.