04.03.2010, 20:26
Please someone tell me whats wrong with that code, ohh and imma real beginner actually so maybe you could change it for me if you like.
Thank you!!
Thank you!!
Код:
if (strcmp(cmd, "/tiri", true) == 0) { if(gTeam[playerid] == 2 || IsACop(playerid)) { tmp = strtok(cmdtext, idx); giveplayerid = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "KASUTA: /tiri [mдngija id]"); return 1; } if(!IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid,COLOR_GREY, string); return 1; } if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 3) { SendClientMessage(playerid, 0xFF0000AA, "You are too far away from that player."); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_RED, "You cannot drag yourself!"); return 1; } if(DragTimer[playerid] <= 0) { if(IsPlayerConnected(giveplayerid) == 1) { GetPlayerName(giveplayerid, sendername, sizeof(sendername)); GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "Officer %s started dragging %s", playername, sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); DragTimer[playerid] = SetTimerEx("Drag", 1000, 1, "ii", playerid, giveplayerid); TogglePlayerControllable(giveplayerid, 0); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / Marine !"); } return 1; }