25.07.2012, 13:10
Hi, i need somebody to help me with taser system...
Now, look at this code, it is code when player punch other player, player is tazed...
Now i want, when player taze other player, i want to write these lines in chat:
FOR Suspect: "You are shocked by Name_Surname"
FOR Cop/fbi/Swat "You shocked a Name_Surname"
You understand me?
I just want that you put that in my code... Please help, i need it
Now, look at this code, it is code when player punch other player, player is tazed...
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) { if(TazerAcceso[playerid] == 1) { if(GetPlayerWeapon(playerid) == 0) { ApplyAnimation(playerid,"KNIFE", "knife_3", 4.0, 0, 1, 1, 1, 1000); SetTimerEx("TimerClear",2000,false,"d",playerid); new victimid = GetClosestPlayer(playerid); new sendername[MAX_PLAYER_NAME]; if(IsPlayerConnected(victimid)) { if(GetDistanceBetweenPlayers(playerid,victimid) < 2) { GameTextForPlayer(victimid, "~r~Sokiran!", 2500, 3); new Float:health; GetPlayerHealth(victimid, health); SetPlayerHealth(victimid, health - 5.0); SetTimerEx("TimerFall",300,false,"d",victimid); TogglePlayerControllable(victimid, 0); SetTimerEx("Untaze", 8000, false, "i", victimid); } } } } return 1; }
FOR Suspect: "You are shocked by Name_Surname"
FOR Cop/fbi/Swat "You shocked a Name_Surname"
You understand me?
I just want that you put that in my code... Please help, i need it