21.07.2009, 12:08
Quote:
|
Originally Posted by //exora
100$ that's copypasted from godfather, please stop doing that and try coding yourself. It's horrible the way it is coded, I took some time and made it hawter. (my style)
pawn Код:
|

Just a quastion, I'm making a /uncuff of this cmd, that looks like this:
Код:
if(strcmp(cmd, "/uncuff", true) == 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = ReturnUser(tmp);
if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /uncuff [Playerid/PartOfName]");
if (GetPlayerTeam(playerid) != 11) return SendClientMessage(playerid, COLOR_RED, "Identification Error - You are not a Police Officer.");
if (PlayerInfo[playerid][pRank] < 1) return SendClientMessage(playerid, COLOR_RED, "Identification Error - You need LAE Rank 1 to do this.");
if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "To far away from player.");
if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "To far away from player.");
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "You were uncuffed by %s.", sendername);
SendClientMessage(giveplayerid, COLOR_BLUE, string);
format(string, sizeof(string), "You uncuffed %s.", giveplayer);
GameTextForPlayer(giveplayerid, "~r~Uncuffed", 2500, 3);
TogglePlayerControllable(giveplayerid, 1);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 300;
}
return 1;
}

