Hi , im trying to do a countdown on lr but it doesn't work and i dont know why.
It does not give the deagle after the 5 seconds... Me and a friend of mine , tryed so many things but still not working, tell me what am i doing wrong , thanks
Code:
public StartGame( iGame, iPrisoner, iGuard )
{
g_iCurrentGame = iGame;
g_iLastRequest[ LR_PRISONER ] = iPrisoner;
g_iLastRequest[ LR_GUARD ] = iGuard;
new szPrisonerName[ 32 ], szGuardName[ 32 ];
get_user_name( iPrisoner, szPrisonerName, charsmax( szPrisonerName ) );
get_user_name( iGuard, szGuardName, charsmax( szGuardName ) );
strip_user_weapons( iPrisoner );
strip_user_weapons( iGuard );
set_user_health( iPrisoner, 100 );
set_user_health( iGuard, 100 );
set_user_armor( iPrisoner, 0 );
set_user_armor( iGuard, 0 );
StartBeacon();
switch( iGame )
{
case LR_S4S:
{
set_task(5.0, "LR_Shot4Shot", iPrisoner)
set_task(5.0, "LR_Shot4Shot", iGuard)
/*
LR_Shot4Shot( iPrisoner );
LR_Shot4Shot( iGuard );
*/
}
case LR_RACE:
{
LR_Race( iPrisoner );
LR_Race( iGuard );
}
case LR_KNIFE:
{
LR_Knife( iPrisoner );
LR_Knife( iGuard );
}
case LR_SPRAY:
{
LR_Spray( iPrisoner );
LR_Spray( iGuard );
}
case LR_GUNTOSS:
{
LR_GunToss( iPrisoner );
LR_GunToss( iGuard );
}
case LR_NADETOSS:
{
LR_NadeToss( iPrisoner );
LR_NadeToss( iGuard );
}
case LR_SCOUT:
{
LR_Scout( iPrisoner );
LR_Scout( iGuard );
}
case LR_SHOTGUN:
{
LR_Shotgun( iPrisoner );
LR_Shotgun( iGuard );
}
}
}
Code:
LR_Shot4Shot( id )
{
new szMapName[ 32 ], iCTOrigin[ 3 ], iTOrigin[ 3 ];
get_mapname( szMapName, charsmax( szMapName ) );
if( equali( szMapName, "some1s_jailbreak" ) )
{
iCTOrigin = { -1352, 271, 38 };
iTOrigin = { -1338, -782, 38 };
if( id == g_iLastRequest[ LR_PRISONER ] )
set_user_origin( id, iTOrigin );
else
set_user_origin( id, iCTOrigin );
}