SA-MP Forums Archive
Changing function - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Changing function (/showthread.php?tid=635953)



Changing function - aoky - 17.06.2017

So, when the player spawns this code runs:
PHP Code:
public OnPlayerSpawn(playerid)
{
    
Character[playerid][Cuffed] = 0;
    if(
Character[playerid][BrutalM] == 1)
    {
        
SetPlayerPos(playeridBMPos[playerid][0], BMPos[playerid][1], BMPos[playerid][2]);
        
DeathT SetTimerEx("AcceptD"120000false"i"playerid);
        
ApplyAnimation(playerid"PED""FLOOR_hit_f"4.101113000001);
        
LegHit[playerid] = 0;
    } 
I want to change that to a different function that happens immediately when the player goes into BrutalM mode. What can I do?