SA-MP Forums Archive
Need Help - 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: Need Help (/showthread.php?tid=329377)



......... - Avi57 - 28.03.2012

Deleted ..............


Re: Need Help - SpiritEvil - 28.03.2012

I hope this is what you're looking for.

pawn Код:
if(strcmp(cmd, "/fix", true) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
    if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000 "You don't have enough cash to repair your vehicle!");
    GivePlayerMoney(playerid, -1000);
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, -1, "Your vehicle has been repaired!");
    return 1;
}

if(strcmp(cmd, "/fuel", true) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
    //Refuel script here.
    SendClientMessage(playerid, -1, "Your vehicle's fuel tank has been refilled!");
    return 1;
}



Re: Need Help - Avi57 - 28.03.2012

Quote:

I hope this is what you're looking for.

pawn Code:
if(strcmp(cmd, "/fix", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000 "You don't have enough cash to repair your vehicle!");
GivePlayerMoney(playerid, -1000);
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, -1, "Your vehicle has been repaired!");
return 1;
}

if(strcmp(cmd, "/fuel", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
//Refuel script here.
SendClientMessage(playerid, -1, "Your vehicle's fuel tank has been refilled!");
return 1;
}

Hey i need to put it in a Filterscript. Can u make a Filterscript for it & paste it on pastebin.com and tell me how can i change the co-ordinates


Re: Need Help - SpiritEvil - 28.03.2012

Okay done here's the link -> http://pastebin.com/Bc56Tqrg


Re: Need Help - Avi57 - 28.03.2012

It says :
Код:
[19:22:09] You must be at the specified location to use this command!

[19:22:23] You must be at the specified location to use this command!
But i was at the same position . Please tell me about this.


Re: Need Help - Avi57 - 29.03.2012

Bump !! Need help. Please help me ASAP !!! Plesase