13.11.2014, 00:18
Another inefficent method. You\'re going to waste 30 lines when you could only use 1? It looks awful like this in my opionon.
What I\'m taking about:
This could easily be done in one line using...
Uncuff can also easily be abused by Law Officers. You don\'t even check if they are cuffed or not. Example using your existing code checking if they are even cuffed:
Your indentation also makes me want to throw up. Just saying![Tongue](images/smilies/razz.gif)
EDIT: Also you have a few typos such as "metres" instead of "meters".
What I\'m taking about:
pawn Code:
new V1;
pawn Code:
new V2;
This could easily be done in one line using...
pawn Code:
#define MAX_VEHICLE 30
pawn Code:
new Vehicles[MAX_VEHICLE];
Uncuff can also easily be abused by Law Officers. You don\'t even check if they are cuffed or not. Example using your existing code checking if they are even cuffed:
pawn Code:
CMD:uncuff(playerid, params[])
{
if(PlayerInfo[playerid][Member] >= 1 || PlayerInfo[playerid][Leader] >= 1)
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 4.0, X, Y, Z))
{
new ID;
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
if(sscanf(params,"i", ID)) return SendClientMessage(playerid,-1,"{FF0000}USAGE: {15FF00}/UnCuff [PlayerID]");
if(GetPlayerSpecialAction(ID) == 24)
{
SetPlayerSpecialAction(ID, SPECIAL_ACTION_NONE);
format(string, sizeof(string), "{0066CC}[POLICE]: {15FF00}You uncuffed {FF0000}%s {15FF00}!", ID);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "{0066CC}{15FF00}You got uncuffed by Police Officer{FF0000}%s {15FF00}!", name);
SendClientMessage(playerid, -1, string);
}
}
}
else
{
SCM(playerid, -1, "{FF0000}ERROR: {15FF00}You aren\'t Police !");
}
return 1;
}
Your indentation also makes me want to throw up. Just saying
![Tongue](images/smilies/razz.gif)
EDIT: Also you have a few typos such as "metres" instead of "meters".