22.11.2009, 16:33
hmm i found the mistake but what is wrong with it
Код:
if(strcmp(cmd, "/hdrag", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /hdrag [PlayerID]");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(DragTimer[playerid] >= 0)
{
if(PlayerCuffed[giveplayerid] == 1)
{
TogglePlayerControllable(giveplayerid, 0);
}
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "officer %s let %s to go", playername, sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
KillTimer(DragTimer[playerid]);
DragTimer[playerid] = 0;
TogglePlayerControllable(giveplayerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not cop!");
}
return 1;
}

