11.11.2011, 10:40
Guys i need your help i want 3 commands only work in coordinates i choose can someone show me how to do that?
CMD:fix(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438)return SendClientMessage(playerid,RED,"You need to be in stunt area to use this command");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, GREEN, "Your vehicle has been successfully repaired!");
return 1;
}
C:\Users\Turhan\Desktop\SA_MP SCRİPTİNG!\SA_MP SERVER\gamemodes\TESTGM.pwn(825) : error 001: expected token: ")", but found "return"
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438)return SendClientMessage(playerid,RED,"You need to be in stunt area to use this command");
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, GREEN, "Your vehicle has been successfully repaired!");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438)) /* <-- Forgot this bracket! */ return SendClientMessage(playerid,RED,"You need to be in stunt area to use this command");