Skip to content

dinhkhoi2298/async-a-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-a-controller

sampctl

Installation

Simply install to your project:

sampctl package install roesanne26/async-a-controller

Include in your code and begin using the library:

#include <async-a-controller>

Dependencies

https://github.com/IllidanS4/PawnPlus/

Usage

Function: Task:async_controller_show

#include <Async-A-Controller>

CMD:dancing(playerid) {
	task_yield(1);
	SetPlayerSpecialAction(playerid, 5);
	new 
		result = task_await(async_controller_show(playerid));
	
	if(result) 
		SendClientMessage(playerid, 0xFFFF00AA, "[DANCING]: Ban da hoan thanh thu thach");
	
	else 
		SendClientMessage(playerid, 0xFF6347AA, "[DANCING]: Ban da that bai thu thach");

	ClearAnimations(playerid);
	SetPlayerSpecialAction(playerid, 0);
	TogglePlayerControllable(playerid, true);
	SetCameraBehindPlayer(playerid);
	return 1;
}

Testing

To test, simply run the package:

sampctl package run

Credits