doevent will doIm try to make onr plugin to call any event like Onpclogin , or other custom Event.
if you want to make it a new command then used bindatcmdi know it, but i want to make like @newcommand and it call some event.
- script Sample_Atcmd FAKE_NPC,{
OnInit:
// This command can only use for GM Group 99
bindatcmd "newcommand",strnpcinfo(3)+"::OnNewCommand",99,99;
end;
OnNewCommand:
mes "[ Admin Command ]";
mes "Choose what option you want to perform.";
next;
switch(select("Event 1:Event 2")){
// Attached Player with RID
case 1:
mes "[ Admin Command ]";
mes "You selected Event 1.";
close2;
doevent "EventNPC_1::OnEventStart";
break;
// No Player Attached in the NPC
case 2:
mes "[ Admin Command ]";
mes "You selected Event 2.";
close2;
donpcevent "EventNPC_2::OnEventStart";
break;
}
end;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.