Killcam help - 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: Killcam help (
/showthread.php?tid=576152)
Killcam help -
NeamPojma - 01.06.2015
Hey people im making killcam and i dont know how to make when someone kill you you will see via textdraw which weapon he used?:
Re: Killcam help -
Banana_Ghost - 01.06.2015
Ok, for example, when a player dies, assuming you already have your Player Textdraws Created, you can create a string, get the weapon name of the reason a player died, and from there, you can set the string of that textdraw and show it to the player that died.
For example:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
new wepname[32],str[42];
GetWeaponName(reason,wepname,sizeof(wepname));
format(str,sizeof(str),"Weapon: %s",wepname);
PlayerTextDrawSetString(playerid,KillCamText[playerid],str);
PlayerTextDrawShow(playerid,KillCamText[playerid]);
return 1;
}