Need /drag command.
#1

Hello there,I am trying to create /drag command using YCMD to my server but i failed,Can anyone help me please?
Reply
#2

Post your code to I help you.
Reply
#3

Ahem,Can you help me and write a YCMD code for me please? I mean i don't know how to use SetPlayerPosition..etc I am new in scripting and need help..
Reply
#4

Look here: SetPlayerPos and SetPlayerFacingAngle
Your command would be like this:
Код:
YCMD:drag(playerid, params[], help)
{
	SetPlayerPos(playerid, X, Y, Z);
	SetPlayerFacingAngle(playerid, angle);
	return 1;
}
It's easy.
Reply
#5

Код:
YCMD:drag(playerid, params[], help) {
	if(help) {
		SendClientMessage(playerid, X11_WHITE, "Drags someone.");
		return 1;
	}
	if(isPlayerFrozen(playerid)) {
		SendClientMessage(playerid, X11_TOMATO_2, "You can't use this while frozen!");
		return 1;
	}

	new faction = GetPVarInt(playerid, "Faction");
	new rank = GetPVarInt(playerid, "Rank");
	if(!IsValidFaction(faction) || faction == 0) {
		SendClientMessage(playerid, X11_TOMATO_2, "You aren't in a faction!");
		return 1;
	}
Alright,This is my server faction..etc all i need now is drag things..(It's Police command)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)