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.
.
Код:
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.