25.09.2013, 05:29
pawn Код:
CMD:drag(playerid, params[])
{
new giveplayerid;
if(IsACop(playerid) || (PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2 || (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRank] >= 10))
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [playerid/partofname]");
if(PlayerCuffed[giveplayerid] == 2) return SendClientMessage(playerid, COLOR_WHITE, "This player must first be cuffed");
if(!ProxDetectorS(8.0, playerid, giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, "That player isn't near you.");
return 1;
}
if(Dragged[playerid] == 0 && Drag[playerid] == 0)
Dragged[playerid] = 1;
Drag[playerid] = 1;
return 1;
}
CMD:stopdrag (playerid, params[])
{
if(IsACop(playerid) || (PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2 || (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRank] >= 10))
Dragged[playerid] = 0;
Drag[playerid] = 0;
{
return 1;
}
}
//DRAG
forward Draggingt(playerid, ID);
public Draggingt(playerid, ID)
{
new Float:dX, Float:dY, Float:dZ;
GetPlayerPos(playerid, dX, dY, dZ);
SetPlayerPos(ID, dX+1, dY, dZ);
}
pawn Код:
//DRAG
forward Draggingt(playerid, ID);
public Draggingt(playerid, ID)
{
new Float:dX, Float:dY, Float:dZ;
GetPlayerPos(playerid, dX, dY, dZ);
SetPlayerPos(ID, dX+1, dY, dZ);
}