SA-MP Forums Archive
Hi. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hi. (/showthread.php?tid=296370)



Hi. - lordturhan - 11.11.2011

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


Re: Hi. - Stigg - 11.11.2011

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: Hi. - lordturhan - 11.11.2011

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"



Re: Hi. - mineralo - 11.11.2011

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


Re: Hi. - Vince - 11.11.2011

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");



Re: Hi. - mineralo - 11.11.2011

try in return that

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