Szóval azt szeretnéd,hogy a nyilakkal lehessen mozgatni az objectet?
[pawn]new object, cmd[MAX_PLAYERS];
[/pawn]
OnGameModeinit:
[pawn]object = CreateObject(.......);[/pawn]
OnPlayerKeyStateChange:
[pawn]
if(cmd[playerid] == 1)
{
new Float:X, Float:Y, Float:Z;
if(newkeys == KEY_ANALOG_UP)
{
GetObjectPos(object,X,Y,Z);
MoveObject(object, X, Y, Z+2);
}
if(newkeys == KEY_ANALOG_DOWN)
{
GetObjectPos(object,X,Y,Z);
MoveObject(object, X, Y, Z-2);
}
}
[/pawn]
Parancs:
[pawn]if(strcmp(cmdtext, \"/kapu\", true) == 0)
{
cmd[playerid] = 1;
return 1;
}
if(strcmp(cmdtext, \"/kapu2\", true) == 0)
{
cmd[playerid] = 0;
return 1;
}[/pawn]
U.I:Sorry ha valami erroros,vagy warningos,mert itt írtam!