#1

Guys i need your help i want 3 commands only work in coordinates i choose can someone show me how to do that?
Reply
#2

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#3

Well i tryed to make something it didnt worked
pawn Код:
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"
Reply
#4

CMD:fix(playerid,params[])
{
PHP код:
if(!IsPlayerInRangeOfPoint(playerid7.02695.6880, -1704.630011.8438)return SendClientMessage(playerid,RED,"You need to be in stunt area to use this command");
if(
IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playeridGREEN"Your vehicle has been successfully repaired!");
}
else
{
SendClientMessage(playerid0xFFFFFFFF"You are not in a vehicle!");
}
return 
1;

try this, it should work
Reply
#5

No it won't. Locate the actual error first before attempting to fix it.

pawn Код:
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");
Reply
#6

try in return that

if(!IsPlayerInArea(playerid,7.0, 2695.6880, -1704.6300, 11.8438 )) return SendClientMessage...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)