13.10.2012, 05:48
Quote:
Код:
new draggedtimer[MAX_PLAYERS]; CMD:drag(playerid, params[]) { new giveplayerid, giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[128], DragOff[MAX_PLAYERS]; if(sscanf(params,"u",giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /drag [playerid]"); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "That Player is offline !"); if(!ProxDetectorS(3.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_GREY,"That player isn't near you !"); if(DragOff[giveplayerid] > 0) return SendClientMessage(playerid, COLOR_GREY,"You are already being Dragged!"); if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You Cannot Drag Yourself!"); if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid) || PlayerInfo[giveplayerid][pMember] == 2 || PlayerInfo[giveplayerid][pMember] == 6 || PlayerInfo[giveplayerid][pLeader] == 6) { return SendClientMessage(playerid, COLOR_GREY,"You can't drag cops"); } if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You are being dragged by %s,", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You begin to drag %s,", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has started to drag %s.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); TogglePlayerControllable(giveplayerid, 0); DragOff[giveplayerid] = playerid; draggedtimer[giveplayerid] = SetTimerEx("DragTimer", 1000, true, playerid, giveplayerid); } else return SendClientMessage(playerid, COLOR_GREY,"You are not a cop"); return 1; forward DragTimer(playerid, giveplayerid); public DragTimer(playerid, giveplayerid) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(giveplayerid, X-1, Y, Z); return 1; } |
Код:
C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94893) : error 035: argument type mismatch (argument 4) C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94898) : warning 225: unreachable code C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94898) : error 029: invalid expression, assumed zero C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94898) : error 017: undefined symbol "DragTimer" C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94899) : error 029: invalid expression, assumed zero C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94899) : error 017: undefined symbol "DragTimer" C:\Users\garg\Desktop\Vernit\SA-MP\SLRP\gamemodes\MSRPMaps.pwn(94906) : error 030: compound statement not closed at the end of file (started at line 94873) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.