13.06.2010, 08:00
Quote:
Originally Posted by $ЂЯĢ
Return when you want function to be ended. You don't need to return values if you don't need them, so doing
Код:
return; |
pawn Код:
if(strcmp(cmd, "/repaircop", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
if(IsACopCar(GetPlayerVehicleID(playerid)))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 50.0, 1568.77,-1692.75,6.98))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_GREEN, "* Your cruiser ate a donut and is now repaired");
}
else
{
SendClientMessage(playerid, COLOR_GREY,"[Error:] You're not in the garage!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"[Error:] Only vehicles can be repaired, not brains!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"[Error:] You're not a cop!");
}
}
}
return 1;
}