Tazer Command
#1

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
Reply
#2

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?
Reply
#3

Why don't you just choose some weapon (silenced?) and define that when you shoot with it and hit someone, he gets tazed?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)