public OnPlayerUpdate(playerid){ new actorid = GetPlayerTargetActor(playerid); new string[32]; format(string, sizeof(string), \"You are aiming at actor id %d\", actorid); SendClientMessage(playerid, -1, string); return 1;}
new BANK_ACTOR;COMMAND:createactor(playerid){new Float: Pos[3];GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);BANK_ACTOR = CreateActor(0, Pos[0], Pos[1]+2.5, Pos[2], 0);return 1;}public OnPlayerUpdate(playerid){new TARGETTED_ACTOR_ID = GetPlayerTargetActor(playerid);if(TARGETTED_ACTOR_ID == BANK_ACTOR){}return 1;}
Nem érdemes OnPlayerUpdate alá ilyen kódot tenni.