02.02.2018, 10:10
try this code, if it's still fails, than show me Draggingt function.
PHP код:
CMD:acceptdrag(playerid, params[])
{
new dragg = GetPVarInt(playerid, "DRAGG");
new string[128], string2[128];
if(dragg == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD1, "The player that has invited you has left the server! Invite has been cancelled."), DeletePVar(playerid, "DRAGG");
if(GetDistanceBetweenPlayers(playerid, dragg) > 2)
{
SendClientMessage(playerid, COLOR_GRAD1, "You're too far away!");
return 1;
}
if(Dragged[playerid] < 0 && Dragging[dragg] < 0)
{
Dragged[playerid] = dragg;
Dragging[dragg] = playerid;
format(string, sizeof(string), "Kamu sedang didrag oleh %s.", GetPlayerName(dragg));
SCM(playerid, COLOR_PURPLE, string);
format(string2, sizeof(string2), "Anda telah mendrag %s, /undrag untuk berhenti", GetPlayerName(playerid));
SCM(dragg, COLOR_PURPLE, string2);
draggedtimer[playerid] = SetTimerEx("Draggingt", 1000, 1, "dd", dragg,playerid);
}
return true;
}