SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/05/2012, 08:24 AM   #1
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,840
Reputation: 297
Default OnPlayerClickMap

Heey all,

I want to make a predator system with onplayerclickmap.
I made:
Code:
public OnObjectMoved(objectid)
{
	if(objectid == missle)
	{
        new Float:p, Float:q, Float:r, Float:s;
		GetObjectPos(missle, p, q, r);
		GetObjectPos(flare, p, q, r);
		MapAndreas_FindZ_For2DCoord(p,q,s);
		DestroyObject(missle);
		DestroyObject(flare);
		CreateExplosion(p, q, s, 7, 6000.0);//6.0
		CreateExplosion(p, q, s, 7, 6000.0);//6.0
  		return 1;
	}
	return 0;
}
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
	MapAndreas_FindZ_For2DCoord(fX,fY,fZ);
	MoveObject(missle, fX, fY, fZ, speed);
	MoveObject(flare, fX, fY, fZ, speed);
	SetCameraBehindPlayer(playerid);
	SetPVarInt(playerid, "mc", 0);
	TogglePlayerControllable(playerid, 1);
	SendClientMessageToAll(COLOR_LIGHTBLUE,"Enemy Predator Activated!");
    return 1;
}
But when i put a marker on map it only says enemy predator activated, i wait for some seconds but nothing happens.
How can i fix this?

Thanks Admigo
__________________
Follow me on Instagram @brandonvanommen
Admigo is offline   Reply With Quote
Old 19/05/2012, 08:32 AM   #2
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,840
Reputation: 297
Default Re: OnPlayerClickMap

Fixed by myself,forget to create the object:P
__________________
Follow me on Instagram @brandonvanommen
Admigo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnPlayerClickMap callback ViktorRageWall Scripting Help 6 28/03/2012 11:38 AM
BUG? OnPlayerClickMap Red_Devils Русский/Russian 6 18/12/2011 03:10 PM


All times are GMT. The time now is 11:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.