24.09.2013, 14:48
Quote:
C:\Users\PB\Desktop\LYLRPHZ\pawno\include\ZCMD.inc (90) : warning 219: local variable "pos" shadows a variable at a preceding level C:\Users\PB\Desktop\LYLRPHZ\pawno\include\YSI\y_sc ripting.inc(29 : warning 219: local variable "pos" shadows a variable at a preceding level C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(16 98 : warning 219: local variable "pos" shadows a variable at a preceding level C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(24 284) : warning 219: local variable "pos" shadows a variable at a preceding level C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(35 657) : warning 219: local variable "pos" shadows a variable at a preceding level C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(60 965) : error 010: invalid function or declaration C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(60 967) : error 017: undefined symbol "playerid" C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(60 967) : error 021: symbol already defined: "Dragged" C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(60 969) : error 021: symbol already defined: "GetPlayerPos" C:\Users\PB\Desktop\LYLRPHZ\gamemodes\LYL11.pwn(60 975) : warning 203: symbol is never used: "pos" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |
pawn Код:
CMD:drag(playerid, params[])
{
new string[128];
if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_GREY, "[Usage]: /drag [playerid]");
if(playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't drag yourself.");
if(Drag[playerid] != -1 || Dragged[playerid] != -1) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at the moment.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't drag someone from a vehicle.");
if(!PlayerCuffed[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Player is not cuffed nor tied.");
if(Dragged[playerid] != -1) return SendClientMessage(playerid, COLOR_GREY, "Player is already being dragged.");
format(string, sizeof(string), "* %s pulls %s and starts draggin them.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
CMD:stopdrag(playerid, params[])
{
new string[128];
if(Drag[playerid] == -1) return SendClientMessage(playerid, COLOR_GREY, "You are not dragging anybody.");
playerid = Drag[playerid];
Drag[playerid] = -1;
Dragged[playerid] = -1;
format(string, sizeof(string), "* %s released %s and stops draggin them.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
pawn Код:
if(Dragged[playerid] != -1)
{
new Dragged[playerid];
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0]+0.5, pos[1]+0.5, pos[2]);
SetPlayerInterior(playerid, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid));
}