moveobject help
#1

I am mapping a jail right now, and for some reason the gates wont compile, I cannot see any errors unless I am missing some SSCANF stuff.

(Note that gov123 shall be the password to open the gate)

Код:
#include <a_samp>

#include <zcmd>

new pgate1;
new pgate2;

public OnFilterScriptInit()
{
	pgate1 = CreateObject(971, -2819.3171,  2651.5464, 103.3268, 0.0, 0.0, 0.0, 100.0);
	pgate2 = CreateObject(971, 2855.7476,  2665.3562, 106.6561, 0.0, 0.0, 0.0, 100.0);
    Create3DTextLabel("Jail\nCommands: /enter", 0x008080FF, -2827.9419, 2274.5588, 85.7897, 40.0, 0, 1);
    Create3DTextLabel("Exit\nCommands: /enter", 0x008080FF, -2843.2856, 2652.1619, 98.6174, 40.0, 0, 1);
	return 1;
}

COMMAND:open gov123(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171,  2651.5464, 103.3268))
		{
		MoveObject(pgate1, -2819.3171, 2648.8591, 103.3268, 6.0);
		return 1;
		}
    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2855.7476,  2665.3562, 106.6561))
		{
		MoveObject(pgate2, -2855.7476, 2668.2810, 106.6561, 6.0);
		return 1;
		}
}

COMMAND:close gov123(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 5.0, -2819.3171,  2651.5464, 103.3268))
		{
		MoveObject(pgate1, -2819.3171,  2651.5464, 103.3268, 6.0);
		return 1;
		}
   if(IsPlayerInRangeOfPoint(playerid, 5.0, 2855.7476,  2665.3562, 106.6561))
		{
		MoveObject(pgate2, 2855.7476,  2665.3562, 106.6561, 6.0);
		return 1;
		}
}
Reply


Messages In This Thread
moveobject help - by Mattakil - 07.04.2013, 17:23
Re: moveobject help - by Mattakil - 07.04.2013, 18:18
Re: moveobject help - by SilverKiller - 07.04.2013, 19:20
Re: moveobject help - by Riddick94 - 07.04.2013, 19:35
Re: moveobject help - by ReVo_ - 07.04.2013, 19:36

Forum Jump:


Users browsing this thread: 3 Guest(s)