Tazer Command - 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: Tazer Command (
/showthread.php?tid=420432)
Tazer Command -
Mattakil - 04.03.2013
Im having this "Empty Statement" error, I can not seem to figure out what is wrong...
Код:
C:\Users\Matt\Desktop\RGRP\filterscripts\taser.pwn(20) : error 036: empty statement
C:\Users\Matt\Desktop\RGRP\filterscripts\taser.pwn(24) : error 036: empty statement
C:\Users\Matt\Desktop\RGRP\filterscripts\taser.pwn(40) : error 017: undefined symbol "clickedplayerid"
C:\Users\Matt\Desktop\RGRP\filterscripts\taser.pwn(41) : error 017: undefined symbol "clickedplayerid"
The error 17s are because of timers in the wrong spot I guess, didnt really look at it.
PAWN CODE:
Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
forward tazed();
public OnFilterScriptInit()
{
}
//==============================================================================
// TazerObect
COMMAND:taser(playerid, params[])
{
SetPlayerAttachedObject(playerid, 1, 18642, 5);
}
//==============================================================================
// OnPlayerTazed
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{ new Float:X, Float:Y, Float:Z;
if(IsPlayerAttachedObjectSlotUsed(playerid, 1));
{
ApplyAnimation(playerid,"SILENCED","Silence_fire",4.1,0,0,0,0,1);
if(IsPlayerInRangeOfPoint(playerid, 7.0, X,Y,Z));
{
PlayerPlaySound(playerid, 6003, 0.0, 0.0, 0.0);
}
//==============================================================================
// Tazed
ApplyAnimation(clickedplayerid,"CRACK","crckdeth1",4.1,0,1,1,1,1);
TogglePlayerControllable(clickedplayerid,0);
SendClientMessage(clickedplayerid,0xFFFFFFFF,"You Have Been Tazed!");
SetTimer("tazed", 10000, false);
}
return 1;
}
public tazed()
{
TogglePlayerControllable(clickedplayerid,1)
ClearAnimations(clickedplayerid);
}
//==============================================================================
public OnFilterScriptExit()
{
return 1;
}
#endif
Basicly, what I am hoping for is, when you go to the kiosk, type /tazer or w/e, you get the object (Ive just scripted it into a command for testing, easier) Then you click on someone, it plays the "Taze" sound and stuns them for 10 seconds
Re: Tazer Command -
Mattakil - 04.03.2013
Now that I think about it, the clicking the player wont work at all, anyone got any ideas? I WANT it to be an actual tazer, maybe like a /T [ID] command?
Re: Tazer Command -
zxc1 - 05.03.2013
Why don't you just choose some weapon (silenced?) and define that when you shoot with it and hit someone, he gets tazed?