08.09.2018, 14:16
Hello world and all the people watching this
! sorry my bad english
we must have #include a_actor.inc
https://github.com/NextGenerationGam.../pawno/include
----------------------------------------------------
step 1 : Create callback (new)
step 2 : Create define
step 3 : Create OnPlayerKeyState
ID Gamemodel different between type NGG / ..... ( if(PlayerInfo[playerid][pJob] != 1 && PlayerInfo[playerid][pJob2] != 1))
step 4 : Create Dialog
step 5 : Create Actor forward LoadStreamerDynamicObjects();
forward LoadStreamerDynamic3DTextLabels();
step 6 : Create Text3D
step 7 : Create stock
End, thanks all watching !
sign : Mr Son
me only a new users in forum.sa-mp.com
! sorry my bad english
we must have #include a_actor.inc
https://github.com/NextGenerationGam.../pawno/include
----------------------------------------------------
step 1 : Create callback (new)
Code:
new ATthamtu;
Code:
#define JoBdetective (1000)
ID Gamemodel different between type NGG / ..... ( if(PlayerInfo[playerid][pJob] != 1 && PlayerInfo[playerid][pJob2] != 1))
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_HANDBRAKE) && (newkeys & KEY_YES))//Tham Tu { if(IsPlayerInRangeOfActor(playerid, ATthamtu)) { if(PlayerInfo[playerid][pJob] != 1 && PlayerInfo[playerid][pJob2] != 1) { ShowPlayerDialog(playerid, JoBdetective, DIALOG_STYLE_LIST, "Cong Viec Tham tu", "Xin viec\nNghi viec chinh\nNghi viec phu", "Dong y", "Khong"); } else ShowPlayerDialog(playerid, JoBdetective, DIALOG_STYLE_LIST, "Cong Viec Tham tu", "Xin viec\nNghi viec chinh\nNghi viec phu", "Dong y", "Khong"); } } return 1; }
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new sendername[MAX_PLAYER_NAME]; new string[128]; // Crash Bug Fix if(strfind(inputtext, "%", true) != -1) { SendClientMessageEx(playerid, COLOR_GREY, "Invalid Character, please try again."); return 1; } if(dialogid == JoBdetective) { if(response) { if(listitem == 0) { return cmd_joinjob(playerid, ""); } if(listitem == 1) { return cmd_quitjob(playerid, "1"); } if(listitem == 2) { return cmd_quitjob(playerid, "2"); } } } return 1; }
Code:
ATthamtu = CreateActor(2, X,Y,Z );
step 6 : Create Text3D
Code:
CreateDynamic3DTextLabel("{00FFFF}(0) press right mouse and y to interactive",COLOR_YELLOW,X,Y,Z+0.5,6.0);
Code:
stock IsPlayerInRangeOfActor(playerid, actorid, Float:radius = 5.0) { new Float:x, Float:y, Float:z; if (GetActorPos(actorid, x, y, z)) { return IsPlayerInRangeOfPoint(playerid, radius, x, y, z); } return 0; }
sign : Mr Son
me only a new users in forum.sa-mp.com