Protection
#1

Hello Guys,
I need Help!

Sorry my English is doesn't nice.
I want a protection command.
When i /protection write then shall a grid come.
It shall then up front, behind, left and right be.
So the i jailed .
And when i run shall the grid with me come.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/protection", cmdtext, true, 10) == 0)
	{
	        new Float:X, Float:Y, Float:Z;
	    
		GetPlayerPos(playerid, X, Y, Z);
		AttachObjectToPlayer(o1, playerid, X, Y, Z, 0, 0, 0);
		AttachObjectToPlayer(o2, playerid, X, Y, Z, 0, 0, 0);
		AttachObjectToPlayer(o3, playerid, X, Y, Z, 0, 0, 0);
		AttachObjectToPlayer(o4, playerid, X, Y, Z, 0, 0, 0);

	        o1 = CreateObject(2930, X+1, Y+1, Z+1, 0, 0, 150); // Up Front
		o2 = CreateObject(2930, X-1, Y+1, Z+1, 0, 0, 150); // Behind
		o3 = CreateObject(2930, X-1, Y+1, Z+1, 0, 0, 0); // Left
		o4 = CreateObject(2930, X-1, Y+1, Z+1, 0, 0, 359.75); // Right
		return 1;
	}
	return 0;
}
SORRY FOR MY ENGLISH.

THANKS <3.
Reply
#2

First create object then attach it.
Reply
#3

Sorry, when i /protection write then it comes don't
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)