Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <a_rnpc>
- new Npc[1];
- new Float: SavePos_RNPCAimAt[2];
- new Float: SavePos_RNPCShotAt[2];
- new Save_SetRNPCSkillLevel[2];
- new Float: SavePos_RNPCWalkTo[3];
- new Float: SavePos_RNPCRunTo[3];
- new Float:SavePos_RNPCSprinTo[3];
- new Float: SavePos_SetRNPCPos[3];
- new Float: SavePos_MoveRNPC[4];
- new VehicleID;
- new PlayerText:TextDrawPos;
- //new Recording[MAX_PLAYERS];
- //new AlreadyItRecorded[MAX_PLAYERS];
- #define RED 0xF10000FF
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //========================================================
- #define NPC_GENERAL 0
- #define NPC_GENERAL_GetRNPCID 1
- #define NPC_GENERAL_GetRNPCState 2
- #define NPC_GENERAL_GetRNPCName 3
- #define NPC_GENERAL_GetRNPCVirtualWorld 4
- //=============
- #define NPC_GENERAL_SetRNPCVirtualWorld 5
- #define NPC_GENERAL_SetRNPCVirtualWorld_WORLDID 6
- //========================================================
- #define NPC_VEHICLE 7
- #define NPC_VEHICLE_PutRNPCInVehicle 8
- #define NPC_VEHICLE_RemoveRNPCFromVehicle 9
- #define NPC_VEHICLE_SetRNPCVehicleSiren 10
- #define NPC_VEHICLE_GetRNPCVehicleSiren 11
- //========================================================
- #define NPC_IPeeped 12
- #define NPC_IPeeped_SetRNPCSkin 13
- //=============
- #define NPC_IPeeped_SetRNPCPos 14
- #define SetRNPCPos_PosX 15
- #define SetRNPCPos_PosY 16
- #define SetRNPCPos_PosZ 17
- #define NPC_IPeeped_GetRNPCPos 18
- //=============
- #define NPC_IPeeped_MoveRNPC 19
- #define MoveRNPC_PosX 20
- #define MoveRNPC_PosY 21
- #define MoveRNPC_PosZ 22
- #define MoveRNPC_Speed 23
- #define MoveRNPC_Speed2 24
- //=============
- #define NPC_IPeeped_SetRNPCFacingAngle 25
- #define NPC_IPeeped_SetRNPCHealth 26
- #define NPC_IPeeped_GetRNPCHealth 27
- #define NPC_IPeeped_SetRNPCArmour 28
- #define NPC_IPeeped_SetRNPCWeapon 29
- #define NPC_IPeeped_GetRNPCWeapon 30
- //=============
- #define NPC_IPeeped_SetRNPCSkillLevel 31
- #define NPC_IPeeped_SetRNPCSkillLevel2 32
- //========================================================
- #define NPC_ACTIONS 33
- #define NPC_ACTIONS_RNPCWalkTo 34
- #define WalkTo_PosX 35
- #define WalkTo_PosY 36
- #define WalkTo_PosZ 37
- //=============
- #define NPC_ACTIONS_RNPCRunTo 38
- #define RNPCRunTo_PosX 39
- #define RNPCRunTo_PosY 40
- #define RNPCRunTo_PosZ 41
- //=============
- #define NPC_ACTIONS_RNPCSprintTo 42
- #define RNPCSprintTo_PosX 43
- #define RNPCSprintTo_PosY 44
- #define RNPCSprintTo_PosZ 45
- //=============
- #define NPC_ACTIONS_RNPCAimAt 46
- #define RNPCAimAt_PosX 47
- #define RNPCAimAt_PosY 48
- //=============
- #define NPC_ACTIONS_RNPCShotAt 49
- #define RNPCShotAt_PosX 50
- #define RNPCShotAt_PosY 51
- //=============
- #define NPC_ACTIONS_RNPCStopUseWeapon 52
- //=============
- #define NPC_ACTIONS_RNPCDriveTo 53
- #define RNPCDriveTo_PosX 54
- #define RNPCDriveTo_PosY 55
- #define RNPCDriveTo_PosZ 56
- #define RNPCDriveTo_Speed 57
- //=============
- #define NPC_ACTIONS_RNPCFollowPlayer 58
- //========================================================
- /*
- #define NPC_REC 29
- #define NPC_REC_RNPC_StartPlayback 60
- #define NPC_REC_RNPC_StopPlayback 61
- #define NPC_REC_RNPC_StartBuildPlayback 62
- */
- main()
- {
- Npc[0] = CreateRNPC("[NPC]EnzoMetlc");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Testing Npc's");
- SendRconCommand("hostname RNPC Functions - By EnzoMetlc.");
- for(new i = 0; i < 299; i++)
- {
- AddPlayerClass(i, 0.00, 0.00, 0.00, 0.00, 1, 2, 3, 4, 5, 2);
- }
- return 1;
- }
- //========================================================== PUBLIC FOR PLAYERS. ==========================================================//
- public OnPlayerRequestClass(playerid, classid)
- {
- SetupPlayerForClassSelection(playerid);
- return 1;
- }
- forward SetupPlayerForClassSelection(playerid);
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerWeather(playerid, 4);
- SetPlayerCameraPos(playerid, -1714.123657, 751.862609, 24.742170);
- SetPlayerCameraLookAt(playerid, -1714.245727, 756.106506, 24.734375);
- SetPlayerFacingAngle(playerid, 180.135635);
- SetPlayerPos(playerid, -1714.245727, 756.106506, 24.734375);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //Recording[playerid] = 0;
- //AlreadyItRecorded[playerid] = 0;
- TextDrawPos = CreatePlayerTextDraw(playerid,220.000000, 426.000000, " ");
- PlayerTextDrawBackgroundColor(playerid, TextDrawPos, 255);
- PlayerTextDrawFont(playerid, TextDrawPos, 2);
- PlayerTextDrawLetterSize(playerid, TextDrawPos, 0.230000, 1.700000);
- PlayerTextDrawColor(playerid, TextDrawPos, -16776961);
- PlayerTextDrawSetOutline(playerid, TextDrawPos, 0);
- PlayerTextDrawSetProportional(playerid, TextDrawPos, 1);
- PlayerTextDrawSetShadow(playerid, TextDrawPos, 1);
- PlayerTextDrawSetSelectable(playerid, TextDrawPos, 0);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- PlayerTextDrawShow(playerid, TextDrawPos);
- SendClientMessage(playerid, -1, "{00FF00}[INFO] Utilize (/Npc) to see the commands to control the Npc.");
- SendClientMessage(playerid, -1, "{00FF00}[INFO] He believes a Vehicle with the Command (/Car [VehicleID]).");
- SetTimerEx("ToUpdatePos", 150, true, "d", playerid);
- SetRNPCPos(Npc[0], -1680.5272, 705.6332, 30.6016);
- GivePlayerWeapon(playerid, 5, 1000);
- GivePlayerWeapon(playerid, 24, 1000);
- GivePlayerWeapon(playerid, 27, 1000);
- GivePlayerWeapon(playerid, 29, 1000);
- GivePlayerWeapon(playerid, 31, 1000);
- GivePlayerWeapon(playerid, 36, 1000);
- SetPlayerTime(playerid, 12, 5);
- SetPlayerPos(playerid, -1682.5272, 705.6332, 30.6016);
- return 1;
- }
- forward ToUpdatePos(playerid);
- public ToUpdatePos(playerid)
- {
- new Float:Pos[3];
- new string[100];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- format(string, 100, "~w~Pos: ~r~%f~w~, ~r~%f~w~, ~r~%f~w~.", Pos[0], Pos[1], Pos[2]);
- PlayerTextDrawSetString(playerid, TextDrawPos, string);
- return 1;
- }
- //========================================================== PUBLIC FOR THE NPC. ==========================================================//
- public OnRNPCCreated(npcid)
- {
- print("A Npc has been created in the Server.");
- return 1;
- }
- public OnRNPCDestroyed(npcid)
- {
- print("A NPC has been destroyed :( ");
- return 1;
- }
- public OnRNPCSpawn(npcid)
- {
- print("A NPC spawned in the Server");
- return 1;
- }
- public OnRNPCPlaybackFinished(npcid)
- {
- print("A NPC finished his recording.");
- return 1;
- }
- public OnRNPCDeath(npcid)
- {
- print("A NPC has died in the Server.");
- return 1;
- }
- //=======================================================================================================================================================================//
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case NPC_GENERAL:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new string[144];
- format(string, sizeof(string), "*** Her ID of the NPC it is: {F11515}%d{FFFFFF}.", GetRNPCID(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 1:
- {
- new string[144];
- format(string, sizeof(string), "*** The condition of the NPC is: {F11515}%i{FFFFFF}.", GetRNPCState(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 2:
- {
- new string[144];
- format(string, sizeof(string), "*** The Nick of the NPC is: {F11515}%s{FFFFFF}.", GetRNPCName(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 3:
- {
- new string[144];
- format(string, sizeof(string), "*** The Virtual World of the NPC is: {F11515}%i{FFFFFF}.", GetRNPCVirtualWorld(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 4:
- {
- ShowPlayerDialog(playerid, NPC_GENERAL_SetRNPCVirtualWorld_WORLDID, DIALOG_STYLE_INPUT, "{00FFFF}To introduce NPC to Virtual World.", \
- "Write her ID of the World Virtua that it wants to put to the NPC.", "To continue", "To cancel");
- }
- }
- }
- }
- case NPC_GENERAL_SetRNPCVirtualWorld_WORLDID:
- {
- if(!response) return Dialog_NPC_GENERAL(playerid);
- SetRNPCVirtualWorld(Npc[0], strval(inputtext));
- new string[144];
- format(string, sizeof(string), "*** You put to the NPC to the Virtual World number: %i", strval(inputtext));
- return SendClientMessage(playerid, -1, string);
- }
- //=======================================================================================================================================================================//
- case NPC_VEHICLE:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- VehicleID = GetPlayerVehicleID(playerid);
- PutRNPCInVehicle(Npc[0], VehicleID, 0);
- }
- else {
- SendClientMessage(playerid, RED, "[<!>] You must be in a Vehicle.");
- }
- }
- case 1:
- {
- if(IsPlayerInAnyVehicle(Npc[0]))
- {
- RemoveRNPCFromVehicle(Npc[0]);
- SendClientMessage(playerid, -1, "[INFO] You removed NPC of his Vehicle.");
- }
- else {
- SendClientMessage(playerid, RED, "[<!>] The NPC is not in a Vehicle.");
- }
- }
- case 2:
- {
- if(IsPlayerInAnyVehicle(Npc[0]))
- {
- ShowPlayerDialog(playerid, NPC_VEHICLE_SetRNPCVehicleSiren, DIALOG_STYLE_INPUT, \
- "{00FFFF}Select the RNPC to do the action.", "Place the condition of the Siren to put the NPC.", "To select", "To cancel");
- }
- else {
- SendClientMessage(playerid, RED, "[<!>] The NPC is not in a Vehicle.");
- }
- }
- case 3:
- {
- new string[144];
- format(string, sizeof(string), "*** Siren of the NPC: %i.", GetRNPCVehicleSiren(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- }
- }
- }
- case NPC_VEHICLE_SetRNPCVehicleSiren:
- {
- if(!response) return Dialog_NPC_VEHICLE(playerid);
- new string[144];
- SetRNPCVehicleSiren(Npc[0], strval(inputtext));
- format(string, sizeof(string), "*** You put the condition of the siren of the NPC in: %i.", strval(inputtext));
- return SendClientMessage(playerid, -1, string);
- }
- //=======================================================================================================================================================================//
- case NPC_IPeeped:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCSkin, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCSkin", "Introduce her ID of the Skin to put the NPC.", "To continue", "To cancel");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCPos, DIALOG_STYLE_LIST, "{00FFFF}SetRNPCPos", "To bring to my position.\nTo write position X, Y, Z.", "To agree", "To cancel");
- }
- case 2:
- {
- new Float:Pos[3], string[144];
- GetRNPCPos(Npc[0], Pos[0], Pos[1], Pos[2]);
- format(string, sizeof(string), "*** The position of the NPC is: {F11515}X: %f{FFFFFF}, {F11515}Y: %f{FFFFFF}, {F11515}Z: %f{FFFFFF}.", Pos[0], Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, string);
- }
- case 3:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_MoveRNPC, DIALOG_STYLE_LIST, \
- "{00FFFF}MoveRNPC.", "To bring to my position.\nTo write the parameters: X, Y, Z, Speed.", "To select", "To cancel");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCFacingAngle, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCFacingAngle.", "{FFFFFF}Write the angle that dese to putting the NPC.\nNorth: 0.| South: 180.| East: 270.| West: 90.", "To continue", "To cancel");
- }
- case 5:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCHealth, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCHealth.", "{FFFFFF}Introduce the quantity of life that it wants to put to the NPC.", "To continue", "To cancel");
- }
- case 6:
- {
- new string[50];
- format(string, sizeof(string), "*** The life of the NPC is: %i", GetRNPCHealth(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 7:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCArmour, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCWeapon.", "{FFFFFF}Introduce the quantity of Armor that it wants him to give to the NPC.", "To continue", "To cancel");
- }
- case 8:
- {
- new string[50];
- format(string, sizeof(string), "*** The armor of the NPC is: %i", GetRNPCArmour(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 9:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCWeapon, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCWeapon.", "{FFFFFF}Introduce her ID of the weapon that it wants him to give to the NPC.", "To continue", "To cancel");
- }
- case 10:
- {
- new string[50];
- format(string, sizeof(string), "*** The weapon of the NPC is: %i", GetRNPCWeapon(Npc[0]));
- SendClientMessage(playerid, -1, string);
- }
- case 11:
- {
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCSkillLevel, DIALOG_STYLE_INPUT, \
- "{00FFFF}SetRNPCSkillLevel.", "Introduce her ID of the weapon that wants to give the skill to the NPC.", "To select", "To cancel");
- }
- }
- }
- }
- //====================================== SetRNPCSkin ======================================//
- case NPC_IPeeped_SetRNPCSkin:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- new string[50];
- SetRNPCSkin(Npc[0], strval(inputtext));
- format(string, sizeof(string), "*** You put the NPC the Skin: %i.", strval(inputtext));
- return SendClientMessage(playerid, -1, string);
- }
- case NPC_IPeeped_SetRNPCPos:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- SetRNPCPos(Npc[0], Pos[0]-2.0, Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, "*** NPC led to his Position.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, SetRNPCPos_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}PosX{FFFFFF}.", \
- "He writes the position X to which it wants to take the NPC.", "To continue", "To cancel");
- }
- }
- }
- //====================================== SetRNPCPos ======================================//
- case SetRNPCPos_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCPos, DIALOG_STYLE_LIST, "{00FFFF}SetRNPCPos", "To bring to my position.\nTo write position X, Y, Z.", "To agree", "To cancel");
- SavePos_SetRNPCPos[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, SetRNPCPos_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}PosY{FFFFFF}.", "He writes the position Y whom it wants to take to the NPC.", "To agree", "To cancel");
- }
- case SetRNPCPos_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, SetRNPCPos_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}PosX{FFFFFF}.", "He writes the position X to which it wants to take the NPC.", "To agree", "To cancel");
- SavePos_SetRNPCPos[1] = floatstr(inputtext);
- ShowPlayerDialog(playerid, SetRNPCPos_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}PosZ{FFFFFF}.", "He writes the position Z to which it wants to take the NPC.", "To agree", "To cancel");
- }
- case SetRNPCPos_PosZ:
- {
- if(!response) return ShowPlayerDialog(playerid, SetRNPCPos_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}PosY{FFFFFF}.", "He writes the position Y whom it wants to take to the NPC.", "To agree", "To cancel");
- SavePos_SetRNPCPos[2] = floatstr(inputtext);
- SetRNPCPos(Npc[0], SavePos_SetRNPCPos[0], SavePos_SetRNPCPos[1], SavePos_SetRNPCPos[2]);
- }
- //====================================== MoveRNPC ======================================//
- case NPC_IPeeped_MoveRNPC:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, MoveRNPC_Speed2, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCPos: {F11515}Speed{FFFFFF}.", \
- "{FFFFFF}He writes the speed to which wants to move the NPC {F11515}({FFFFFF}'0.006' it is the normal value{F11515}){FFFFFF}.", "To agree", "To cancel");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, MoveRNPC_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}MoveRNPC: {F11515}PosX{FFFFFF}.", \
- "He writes the position X to which wants to move the NPC.", "To agree", "To cancel");
- }
- }
- }
- case MoveRNPC_Speed2:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_IPeeped_MoveRNPC, DIALOG_STYLE_LIST, "{00FFFF}MoveRNPC.", "To bring to my position.\nTo write the parameters: X, Y, Z, Speed.", "To select", "To cancel");
- new string[90];
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- MoveRNPC(Npc[0], Pos[0], Pos[1], Pos[2], floatstr(inputtext));
- format(string, sizeof(string), "*** NPC moved his Position with the speed: %0.3f.", floatstr(inputtext));
- SendClientMessage(playerid, -1, string);
- }
- case MoveRNPC_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_IPeeped_MoveRNPC, DIALOG_STYLE_LIST, "{00FFFF}MoveRNPC", "To bring to my position.\nTo write parameters: X, Y, Z, Speed.", "To agree", "To cancel");
- SavePos_MoveRNPC[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, MoveRNPC_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}MoveRNPC: {F11515}PosY{FFFFFF}.", "He writes the position Y to which wants to move the NPC.", "To agree", "To cancel");
- }
- case MoveRNPC_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, MoveRNPC_PosX, DIALOG_STYLE_INPUT, "{00FF00}MoveRNPC: {F11515}PosX{FFFFFF}.", "He writes the position X to which wants to move the NPC.", "To agree", "To cancel");
- SavePos_MoveRNPC[1] = floatstr(inputtext);
- ShowPlayerDialog(playerid, MoveRNPC_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}MoveRNPC: {F11515}PosZ{FFFFFF}.", "He writes the position Z to which wants to move the NPC.", "To agree", "To cancel");
- }
- case MoveRNPC_PosZ:
- {
- if(!response) return ShowPlayerDialog(playerid, SetRNPCPos_PosY, DIALOG_STYLE_INPUT, "{00FF00}MoveRNPC: {F11515}PosY{FFFFFF}.", "He writes the position Y to which wants to move the NPC.", "To agree", "To cancel");
- SavePos_MoveRNPC[2] = floatstr(inputtext);
- ShowPlayerDialog(playerid, MoveRNPC_Speed, DIALOG_STYLE_INPUT, "{FFFFFF}MoveRNPC: {F11515}Speed{FFFFFF}.", "{FFFFFF}He writes the speed to which wants to move the NPC {F11515}({FFFFFF}'0.006' It is the normal value{F11515}){FFFFFF}.", "To agree", "To cancel");
- }
- case MoveRNPC_Speed:
- {
- if(!response) return ShowPlayerDialog(playerid, SetRNPCPos_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}MoveRNPC: {F11515}PosZ{FFFFFF}.", "He writes the position Z to which wants to move the NPC.", "To agree", "To cancel");
- SavePos_MoveRNPC[3] = floatstr(inputtext);
- new string[150];
- MoveRNPC(Npc[0], SavePos_MoveRNPC[0], SavePos_MoveRNPC[1], SavePos_MoveRNPC[2], SavePos_MoveRNPC[3]);
- format(string, sizeof(string), "PosX: {F11515}%f{FFFFFF}, PosY: {F11515}%f{FFFFFF}, PosZ: {F11515}%f{FFFFFF}, Speed: {F11515}%0.3f{FFFFFF}.", SavePos_MoveRNPC[0], SavePos_MoveRNPC[1], SavePos_MoveRNPC[2], SavePos_MoveRNPC[3]);
- SendClientMessage(playerid, -1, string);
- }
- //====================================== SetRNPCFacingAngle ======================================//
- case NPC_IPeeped_SetRNPCFacingAngle:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- new string[20];
- SetRNPCFacingAngle(Npc[0], floatstr(inputtext));
- format(string, sizeof(string), "*** Put angle: º%0.0f.", floatstr(inputtext));
- SendClientMessage(playerid, -1, string);
- }
- case NPC_IPeeped_SetRNPCHealth:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- new string[50];
- SetRNPCHealth(Npc[0], strval(inputtext));
- format(string, sizeof(string), "*** You him put 'º%i' of life to the NPC.", strval(inputtext));
- SendClientMessage(playerid, -1, string);
- }
- case NPC_IPeeped_SetRNPCArmour:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- new string[100];
- SetRNPCArmour(Npc[0], strval(inputtext));
- format(string, 100, "*** You put him 'º%i ' of armor to the NPC.", strval(inputtext));
- SendClientMessage(playerid, -1, string);
- }
- case NPC_IPeeped_SetRNPCWeapon:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- new string[100];
- SetRNPCWeapon(Npc[0], strval(inputtext));
- format(string, 100, "*** You put the weapon number '%i' to the NPC.", strval(inputtext));
- SendClientMessage(playerid, -1, string);
- }
- //====================================== SetRNPCSkillLevel ======================================//
- case NPC_IPeeped_SetRNPCSkillLevel:
- {
- if(!response) return Dialog_NPC_IPeeped(playerid);
- Save_SetRNPCSkillLevel[0] = strval(inputtext);
- ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCSkillLevel2, DIALOG_STYLE_INPUT, "{FFFFFF}SetRNPCSkillLevel: {F11515}SkillLevel{FFFFFF}.", \
- "Introduce the quantity of skill that it wants him to give to the NPC.", "To continue", "To cancel");
- }
- case NPC_IPeeped_SetRNPCSkillLevel2:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_IPeeped_SetRNPCSkillLevel, DIALOG_STYLE_INPUT, "{00FFFF}SetRNPCSkillLevel.", "Introduce her ID of the weapon that wants to give the skill to the NPC.", "To select", "To cancel");
- new string[90];
- Save_SetRNPCSkillLevel[1] = strval(inputtext);
- SetRNPCSkillLevel(Npc[0], Save_SetRNPCSkillLevel[0], Save_SetRNPCSkillLevel[1]);
- format(string, sizeof(string), "ID of Weapon: {F11515}%i{FFFFFF}. | Quantity of skill: {F11515}%i{FFFFFF}.", Save_SetRNPCSkillLevel[0], Save_SetRNPCSkillLevel[1]);
- SendClientMessage(playerid, -1, string);
- }
- //=======================================================================================================================================================================//
- case NPC_ACTIONS:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCWalkTo, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCWalkTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCRunTo, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCRunTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- }
- case 2:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCSprintTo, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCSprintTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- }
- case 3:
- {
- new Armas = GetPlayerWeapon(Npc[0]);
- if(Armas < 17)
- {
- SendClientMessage(playerid, RED, "[<!>] The NPC must have an firearm.");
- }
- else {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCAimAt, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCAimAt.", "To do that the NPC points at me.\nTo make aim at the NPC to the position X, Y.", "To select", "To cancel");
- }
- }
- case 4:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCShotAt, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCShotAt.", "To do that the NPC shoots towards my position.\nTo write the posición X, Y.", "To select", "To cancel");
- }
- case 5:
- {
- RNPCStopUseWeapon(Npc[0]);
- SendClientMessage(playerid, -1, "*** The NPC stopped shooting.");
- }
- case 6:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCDriveTo, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCDriveTo.", "[NPC]SA.MP1 \n[NPC]SA.MP2 \n[NPC]SA.MP3 \n[NPC]SA.MP4 \n[NPC]SA.MP5", "To select", "To cancel");
- }
- case 7:
- {
- ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCFollowPlayer, DIALOG_STYLE_LIST, \
- "{00FFFF}RNPCFollowPlayer.", "RNPC_SPEED_SPRINT. \nRNPC_SPEED_RUN. \nRNPC_SPEED_WALK. \nRNPC_SPEED_FASTWALK.", "To select", "To cancel");
- }
- }
- }
- }
- case NPC_ACTIONS_RNPCWalkTo:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- RNPCWalkTo(Npc[0], Pos[0], Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, "*** NPC travelled up to his position.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, WalkTo_PosX, DIALOG_STYLE_INPUT, \
- "{FFFFFF}RNPCWalkTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X.", "To select", "To cancel");
- }
- }
- }
- case WalkTo_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCWalkTo, DIALOG_STYLE_LIST, "{00FFFF}RNPCWalkTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- SavePos_RNPCWalkTo[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, WalkTo_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCWalkTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to which wants to move the NPC.", "To agree", "To cancel");
- }
- case WalkTo_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, WalkTo_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCWalkTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X.", "To select", "To cancel");
- SavePos_RNPCWalkTo[1] = floatstr(inputtext);
- ShowPlayerDialog(playerid, WalkTo_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCWalkTo: {F11515}PosZ{FFFFFF}.", "{FFFFFF}He writes the position Z to which wants to move the NPC.", "To agree", "To cancel");
- }
- case WalkTo_PosZ:
- {
- if(!response) return ShowPlayerDialog(playerid, MoveRNPC_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCWalkTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to which wants to move the NPC.", "To agree", "To cancel");
- new string[125];
- SavePos_RNPCWalkTo[2] = floatstr(inputtext);
- RNPCWalkTo(Npc[0], SavePos_RNPCWalkTo[0], SavePos_RNPCWalkTo[1], SavePos_RNPCWalkTo[2]);
- format(string, 125, "PosX: {F11515}%f{FFFFFF}, PosY: {F11515}%f{FFFFFF}, PosZ: {F11515}%f{FFFFFF}.", SavePos_RNPCWalkTo[0], SavePos_RNPCWalkTo[1], SavePos_RNPCWalkTo[2]);
- SendClientMessage(playerid, -1, string);
- }
- case NPC_ACTIONS_RNPCRunTo:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- RNPCRunTo(Npc[0], Pos[0], Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, "*** NPC trotting up to his position.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, RNPCRunTo_PosX, DIALOG_STYLE_INPUT, \
- "{FFFFFF}RNPCRunTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to travel the NPC.", "To select", "To cancel");
- }
- }
- }
- case RNPCRunTo_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCRunTo, DIALOG_STYLE_LIST, "{00FFFF}RNPCRunTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- SavePos_RNPCRunTo[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCRunTo_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to make to trot to the NPC.", "To agree", "To cancel");
- }
- case RNPCRunTo_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCRunTo_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to trot to the NPC.", "To select", "To cancel");
- SavePos_RNPCRunTo[1] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCRunTo_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosZ{FFFFFF}.", "{FFFFFF}He writes the position Z to make to trot to the NPC.", "To agree", "To cancel");
- }
- case RNPCRunTo_PosZ:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCRunTo_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to make to trot to the NPC.", "To agree", "To cancel");
- new string[125];
- SavePos_RNPCRunTo[2] = floatstr(inputtext);
- RNPCRunTo(Npc[0], SavePos_RNPCRunTo[0], SavePos_RNPCRunTo[1], SavePos_RNPCRunTo[2]);
- format(string, 125, "PosX: {F11515}%f{FFFFFF}, PosY: {F11515}%f{FFFFFF}, PosZ: {F11515}%f{FFFFFF}.", SavePos_RNPCRunTo[0], SavePos_RNPCRunTo[1], SavePos_RNPCRunTo[2]);
- SendClientMessage(playerid, -1, string);
- }
- case NPC_ACTIONS_RNPCSprintTo:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- RNPCSprintTo(Npc[0], Pos[0], Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, "*** NPC running up to his position.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, RNPCSprintTo_PosX, DIALOG_STYLE_INPUT, \
- "{FFFFFF}RNPCRunTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to run to the NPC.", "To select", "To cancel");
- }
- }
- }
- case RNPCSprintTo_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCSprintTo, DIALOG_STYLE_LIST, "{00FFFF}RNPCSprintTo.", "To bring NPC to my position.\nTo write position X, Y, Z.", "To select", "To cancel");
- SavePos_RNPCSprinTo[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCSprintTo_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to make to run to the NPC.", "To agree", "To cancel");
- }
- case RNPCSprintTo_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCRunTo_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to run to the NPC.", "To select", "To cancel");
- SavePos_RNPCSprinTo[1] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCSprintTo_PosZ, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosZ{FFFFFF}.", "{FFFFFF}He writes the position Z to make to run to the NPC.", "To agree", "To cancel");
- }
- case RNPCSprintTo_PosZ:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCRunTo_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCRunTo: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to make to run to the NPC.", "To agree", "To cancel");
- new string[125];
- SavePos_RNPCSprinTo[2] = floatstr(inputtext);
- RNPCSprintTo(Npc[0], SavePos_RNPCSprinTo[0], SavePos_RNPCSprinTo[1], SavePos_RNPCSprinTo[2]);
- format(string, 125, "PosX: {F11515}%f{FFFFFF}, PosY: {F11515}%f{FFFFFF}, PosZ: {F11515}%f{FFFFFF}.", SavePos_RNPCSprinTo[0], SavePos_RNPCSprinTo[1], SavePos_RNPCSprinTo[2]);
- SendClientMessage(playerid, -1, string);
- }
- case NPC_ACTIONS_RNPCAimAt:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- RNPCAimAt(Npc[0], Pos[0], Pos[1]);
- SendClientMessage(playerid, -1, "*** The NPC is aiming at it.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, RNPCAimAt_PosX, DIALOG_STYLE_INPUT, \
- "{FFFFFF}RNPCAimAt: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to point at the NPC.", "To select", "To cancel");
- }
- }
- }
- case RNPCAimAt_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCShotAt, DIALOG_STYLE_LIST, "{00FFFF}RNPCShotAt.", "To do that the NPC shoots towards my position.\nTo write the posición X, Y.", "To select", "To cancel");
- SavePos_RNPCAimAt[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCAimAt_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCAimAt: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to do diparar the NPC.", "To agree", "To cancel");
- }
- case RNPCAimAt_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCAimAt_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCAimAt: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to point at the NPC.", "To select", "To cancel");
- SavePos_RNPCAimAt[1] = floatstr(inputtext);
- new string[125];
- RNPCAimAt(Npc[0], SavePos_RNPCAimAt[0], SavePos_RNPCAimAt[1]);
- format(string, 60, "X: {F11515}%f{FFFFFF}. Z: {F11515}%f{FFFFFF}.", SavePos_RNPCAimAt[0], SavePos_RNPCAimAt[1]);
- SendClientMessage(playerid, -1, string);
- }
- case NPC_ACTIONS_RNPCShotAt:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- new Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- RNPCShotAt(Npc[0], Pos[0], Pos[1]);
- SendClientMessage(playerid, -1, "*** The NPC is shooting him.");
- }
- case 1:
- {
- ShowPlayerDialog(playerid, RNPCAimAt_PosX, DIALOG_STYLE_INPUT, \
- "{FFFFFF}RNPCAimAt: {F11515}PosX{FFFFFF}.", "{FFFFFF}To write the position X to make to shoot the NPC.", "To select", "To cancel");
- }
- }
- }
- case RNPCShotAt_PosX:
- {
- if(!response) return ShowPlayerDialog(playerid, NPC_ACTIONS_RNPCAimAt, DIALOG_STYLE_LIST, "{00FFFF}RNPCAimAt.", "To do that the NPC points at me.\nTo make aim at the NPC to the position X, Y.", "To select", "To cancel");
- SavePos_RNPCShotAt[0] = floatstr(inputtext);
- ShowPlayerDialog(playerid, RNPCAimAt_PosY, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCAimAt: {F11515}PosY{FFFFFF}.", "{FFFFFF}He writes the position Y to make to point at the NPC.", "To agree", "To cancel");
- }
- case RNPCShotAt_PosY:
- {
- if(!response) return ShowPlayerDialog(playerid, RNPCRunTo_PosX, DIALOG_STYLE_INPUT, "{FFFFFF}RNPCAimAt: {F11515}PosX{FFFFFF}.", "{FFFFFF}Write the position X to make to point at the NPC.", "To select", "To cancel");
- SavePos_RNPCShotAt[1] = floatstr(inputtext);
- new string[125];
- RNPCShotAt(Npc[0], SavePos_RNPCShotAt[0], SavePos_RNPCShotAt[1]);
- format(string, 125, "X: {F11515}%f{FFFFFF}. Z: {F11515}%f{FFFFFF}.", SavePos_RNPCShotAt[0], SavePos_RNPCShotAt[1]);
- SendClientMessage(playerid, -1, string);
- }
- case NPC_ACTIONS_RNPCFollowPlayer:
- {
- if(!response) return Dialog_NPC_ACTIONS(playerid);
- switch(listitem)
- {
- case 0:
- {
- RNPCFollowPlayer(Npc[0], playerid, RNPC_SPEED_SPRINT);
- }
- case 1:
- {
- RNPCFollowPlayer(Npc[0], playerid, RNPC_SPEED_RUN);
- }
- case 2:
- {
- RNPCFollowPlayer(Npc[0], playerid, RNPC_SPEED_WALK);
- }
- case 3:
- {
- RNPCFollowPlayer(Npc[0], playerid, RNPC_SPEED_FASTWALK);
- }
- }
- }
- //=======================================================================================================================================================================//
- /*
- case NPC_REC:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(Recording[playerid] == 0)
- {
- AlreadyItRecorded[playerid] = 0;
- ShowPlayerDialog(playerid, NPC_REC_RNPC_StartPlayback, DIALOG_STYLE_INPUT, \
- "{00FFFF}RNPC_StartPlayback.", "Introduzca el Nombre que desea darle a la grabación.", "To select", "To cancel");
- }
- else
- {
- SendClientMessage(playerid, RED, "[<!>] Termine la grabación del NPC antes de comenzar otra.");
- }
- }
- case 1:
- {
- if(Recording[playerid] == 1)
- {
- RNPC_StopPlayback(Npc[0]);
- SendClientMessage(playerid, -1, "[NOTA] Grabación del NPC terminada.");
- AlreadyItRecorded[playerid] = 1;
- }
- else
- {
- SendClientMessage(playerid, RED, "[<!>] Usted no estaba Recording.");
- }
- }
- case 2:
- {
- if(AlreadyItRecorded[playerid] == 1)
- {
- RNPC_StartBuildPlayback(Npc[0], 0, 0);
- }
- else {
- SendClientMessage(playerid, RED, "[<!>] Usted no grabó nada.");
- }
- }
- }
- }
- }
- case NPC_REC_RNPC_StartPlayback:
- {
- if(!response) return Dialog_NPC_REC(playerid);
- new string[125];
- RNPC_StartPlayback(Npc[0], inputtext);
- Recording[playerid] = 1;
- format(string, sizeof(string), "*** El Nombre de la grabación será: {F11515}%s{FFFFFF}.", inputtext);
- SendClientMessage(playerid, -1, string);
- }
- */
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success)
- {
- SendClientMessage(playerid, 0xF10000FF, "[<!>] Non-existent command. Utilize (/Npc)..");
- }
- return 1;
- }
- CMD:npcgeneral(playerid, params[])
- {
- Dialog_NPC_GENERAL(playerid);
- return 1;
- }
- CMD:npcvehicle(playerid, params[])
- {
- Dialog_NPC_VEHICLE(playerid);
- return 1;
- }
- CMD:npcipeeded(playerid, params[])
- {
- Dialog_NPC_IPeeped(playerid);
- return 1;
- }
- CMD:npcactions(playerid, params[])
- {
- Dialog_NPC_ACTIONS(playerid);
- return 1;
- }
- /*
- CMD:npcrec(playerid, params[])
- {
- Dialog_NPC_REC(playerid);
- return 1;
- }
- */
- CMD:npc(playerid, params[])
- {
- ShowPlayerDialog(playerid, 120, DIALOG_STYLE_MSGBOX, "{00FFFF}Commands RNPC'S.", "{FFFFFF}(/NpcGeneral).\n(/NpcVehicle).\n(/NpcIPeeped).\n(/NpcActions).\n(/NpcRec) {F11515}({FFFFFF}Removed option{F11515}){FFFFFF}.", "Thank you", "");
- return 1;
- }
- CMD:car(playerid, params[])
- {
- new Carro;
- if(sscanf(params, "i", Carro))
- {
- SendClientMessage(playerid, RED, "[INFO] (/Car [VehicleID]).");
- } else {
- new Float:Pos[3], Float:Angle;
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetPlayerFacingAngle(playerid, Angle);
- CreateVehicle(Carro, Pos[0], Pos[1]+2.0, Pos[2], Angle, random(128), random(128), 10*60*1000);
- }
- return 1;
- }
- //=============================================================================== STOCK'S ===============================================================================//
- stock Dialog_NPC_GENERAL(playerid)
- {
- ShowPlayerDialog(playerid, NPC_GENERAL, DIALOG_STYLE_LIST, "{00FFFF}Functions of the RNPC.", \
- "{00FF00}GetRNPCID. \n\
- {FFFFFF}GetRNPCState. \n\
- {00FF00}GetRNPCName. \n\
- {FFFFFF}GetRNPCVirtualWorld. \n\
- {00FF00}SetRNPCVirtualWorld.", \
- "To select", "To cancel");
- return 1;
- }
- stock Dialog_NPC_VEHICLE(playerid)
- {
- ShowPlayerDialog(playerid, NPC_VEHICLE, DIALOG_STYLE_LIST, "{00FFFF}Functions of the RNPC.", \
- "{FFFFFF}PutRNPCInVehicle. \n\
- {00FF00}RemoveRNPCFromVehicle. \n\
- {FFFFFF}SetRNPCVehicleSiren. \n\
- {00FF00}GetRNPCVehicleSiren.", \
- "To select", "To cancel");
- return 1;
- }
- stock Dialog_NPC_IPeeped(playerid)
- {
- new string[280];
- strcat(string, "{FFFFFF}SetRNPCSkin. \n");
- strcat(string, "{00FF00}SetRNPCPos.\n");
- strcat(string, "{FFFFFF}GetRNPCPos. \n");
- strcat(string, "{00FF00}MoveRNPC. \n");
- strcat(string, "{FFFFFF}SetRNPCFacingAngle. \n");
- strcat(string, "{00FF00}SetRNPCHealth. \n");
- strcat(string, "{FFFFFF}GetRNPCHealth. \n");
- strcat(string, "{00FF00}SetRNPCArmour. \n");
- strcat(string, "{FFFFFF}GetRNPCArmour. \n");
- strcat(string, "{00FF00}SetRNPCWeapon. \n");
- strcat(string, "{FFFFFF}GetRNPCWeapon. \n");
- strcat(string, "{00FF00}SetRNPCSkillLevel. \n");
- ShowPlayerDialog(playerid, NPC_IPeeped, DIALOG_STYLE_LIST, "{00FFFF}Functions of the RNPC.", string, "To select", "To cancel");
- return 1;
- }
- stock Dialog_NPC_ACTIONS(playerid)
- {
- new string[250];
- strcat(string, "{FFFFFF}RNPCWalkTo. \n");
- strcat(string, "{00FF00}RNPCRunTo. \n");
- strcat(string, "{FFFFFF}RNPCSprintTo. \n");
- strcat(string, "{00FF00}RNPCAimAt. \n");
- strcat(string, "{FFFFFF}RNPCShotAt. \n");
- strcat(string, "{00FF00}RNPCStopUseWeapon. \n");
- strcat(string, "{FFFFFF}RNPCDriveTo. \n");
- strcat(string, "{00FF00}RNPCFollowPlayer. \n");
- ShowPlayerDialog(playerid, NPC_ACTIONS, DIALOG_STYLE_LIST, "{00FFFF}Functions of the RNPC.", string, "To agree", "To cancel");
- return 1;
- }
- /*
- stock Dialog_NPC_REC(playerid)
- {
- new string[70];
- strcat(string, "{FFFFFF}RNPC_StartPlayback. \n");
- strcat(string, "{00FF00}RNPC_StopPlayback. \n");
- strcat(string, "{FFFFFF}RNPC_StartBuildPlayback.");
- ShowPlayerDialog(playerid, NPC_REC, DIALOG_STYLE_LIST, "{00FFFF}Functions of the RNPC.", string, "To select", "To cancel");
- return 1;
- }
- */
- //=======================================================================================================================================================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement