10.05.2012, 03:41
first off i think you have done a decent job,
but I would not compact the code so much,
noobies will have a better time understanding the same code but written
but line for line like you showed is good.
and comments in the code normally help for the COPIERS
lol
all in all good job 7/10
but I would not compact the code so much,
noobies will have a better time understanding the same code but written
pawn Код:
CMD:afix(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4) //check admin level
{
if(!IsPlayerInAnyVehicle(playerid)) //check if they are NOT in a vehicle
{
return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
}
//they are in a vehicle so repaire and send a message
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
}
else //they are not an admin so send message saying so
{
return SendClientMessage, 0xFFFFFFFF, " **You must be a level 4 admin to use that!");
}
return 1; //also i see no point in a return here when it will never be reached.
}
and comments in the code normally help for the COPIERS
![Wink](images/smilies/wink.png)
all in all good job 7/10