Need /drag command. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need /drag command. (
/showthread.php?tid=567436)
Need /drag command. -
UnKnownEgyptain - 13.03.2015
Hello there,I am trying to create /drag command using YCMD to my server but i failed,Can anyone help me please?
Re: Need /drag command. -
awoo - 13.03.2015
Post your code to I help you.
Re: Need /drag command. -
UnKnownEgyptain - 13.03.2015
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..
Re: Need /drag command. -
awoo - 13.03.2015
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.
Re: Need /drag command. -
UnKnownEgyptain - 13.03.2015
Код:
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)