new Sanyi;public OnGameModeInit(){ Sanyi = CreateActor(0, 0.0, 0.0, 3.0, 0.0); return true;}public OnPlayerUpdate(playerid){ ActorKijeloles(playerid); return true;}forward ActorKijeloles(playerid);public ActorKijeloles(playerid){ new actorid = GetPlayerTargetActor(playerid); if(actorid != INVALID_ACTOR_ID ) { switch(actorid) { case Sanyi: ShowPlayerDialog(....); default: SendClientMessage(playerid, -1, \"Nincs interakció társítva az Actorhoz!\"); } }}
#include <zcmd>new bool:GetPos[MAX_PLAYERS] = false;CMD:getpos(playerid){ switch(GetPos[playerid]) { case 0: GetPos[playerid] = true, SendClientMessage(playerid, -1, \"Bekapcsoltad a getpos parancsot!\"); case 1: GetPos[playerid] = false, SendClientMessage(playerid, -1, \"Kikapcsoltad a getpos parancsot!\"); } return true;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if((newkeys & (KEY_FIRE)) == (KEY_FIRE)) { if(GetPos[playerid] == true) { new adatok[128], Float:Pozok[4]; GetPlayerPos(playerid, Pozok[0],Pozok[1],Pozok[2]); GetPlayerFacingAngle(playerid, Pozok[3]); format(adatok, sizeof(adatok), \"Poziciód: X: %f | Y:%f | Z: %f | A: %f | VW: %d | Int:%d\", Pozok[0],Pozok[1],Pozok[2], Pozok[3], GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)); SendClientMessage(playerid, -1, adatok); GetPos[playerid] =false; } } return true;}
CMD:createactor(playerid, params[]){new objid, Float:x, Float:y, Float:z;if(sscanf(params, \"d\", objid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /createactor [ObjectID]\");GetPlayerPos(playerid, x, y, z);CreateActor(objid, x, y, z, 0.0);CreateObject(3045, x, y, z, 0, 0, 0, 0.0);new string[256];format(string, sizeof(string), \"(( Létrehoztál egy actort! (SkinID: %d) ))\", objid);SendClientMessage(playerid, COLOR_SIKER, string);return 1;}
CMD:sss(playerid, params[]){SelectObject(playerid);return 1;}