bisquses
Умник
Как задать ID динамическим актерам?
Хочу телепортироваться по ID актерам которые расположены на карте, не получается только по 0 координатам тпает
Хочу телепортироваться по ID актерам которые расположены на карте, не получается только по 0 координатам тпает
PHP:
enum g_actors_quest_struct
{
a_id,
a_skin,
Float: aX,
Float: aY,
Float: aZ,
Float: aA
}
static const g_actors_quest[4][g_actors_quest_struct] =
{
{0, 12, 00.00, 00.00, 00.00},
{1, 14, 05.00, 0.00, 00.00},
{2, 24, 08.00, 00.00, 00.00},
{3, 127, 09.00, 00.00, 00.00}
};
CMD:test(playerid)
{
for(new i; i < sizeof g_actors_quest; i++)
{
actorid[i] = CreateActor(g_actors_quest[i][a_skin], g_actors_quest[i][aX], g_actors_quest[i][aY], g_actors_quest[i][aZ], g_actors_quest[i][aA]);
}
}
CMD:tp(playerid, params[])
{
if(!strlen(params))
return SendClientMessage(playerid, -1, "tp [id actor]");
new id;
SetPlayerPos(playerid, g_actors_quest[id][aX], g_actors_quest[id][aY], g_actors_quest[id][aZ], g_actors_quest[id][aA]);
return 1;
}
