06.10.2013, 06:39
Hello, I'm looking for a system like the title says, Is there any command on how to do it?
Shoot someone with Deagle/Spas/Sniper will be Tazed
Shoot someone with Deagle/Spas/Sniper will be Tazed
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34)
{
// This for sniper rifle when someone use it and shoot the shooted player will die from first shoot
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
|
Use OnPlayerGiveDemage and OnPlayerTakeDemage to create that.
SetTimerEx, for the "freeze" to pass, and SetPlayerControllable to freeze the player. Edit: For the fall down part use animations on OnPlayerTakeDemage.. Good luck. ![]() |
|
ok sorry for wrong understand.
pawn Код:
https://sampwiki.blast.hk/wiki/Weapons |
|
Add this any where you want in your script dont worry it wont effect any problems.
|
C:\Users\user\Desktop\[0.3x]Razer Roleplay\gamemodes\RZRP.pwn(58040) : error 021: symbol already defined: "cmd_d"
C:\Users\user\Desktop\[0.3x]Razer Roleplay\gamemodes\RZRP.pwn(95257) : error 021: symbol already defined: "OnPlayerTakeDamage"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34) //sniper
{
SetPlayerHealth(playerid, 0.0);
//add here anim you want
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 24) // deagle
{
SetPlayerHealth(playerid, 0.0);
//add here anim you want
}
return 1;
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 34) //and change weaponid == 34 to the weapon you want
{
SetPlayerHealth(playerid, 0.0);
//add here anim you want
}
|
pawn Код:
anims : https://sampwiki.blast.hk/wiki/Animations if you want to add more weapons just copy pawn Код:
|