IsPlayerinrangeof point help
#1

ok i have this cmd

pawn Код:
CMD:randomtune(playerid, params[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessageEx(playerid, COLOR_WHITE, "You are not in the driver seat!");
    else if(GetPlayerCash(playerid) <= 99999) return SendClientMessageEx(playerid, COLOR_WHITE, "You need $500,000 to randomly tune this vehicle!");

    else if(IsWarned[playerid] == 0)
    {
        SendClientMessageEx(playerid, COLOR_REALRED, "Warning: This will remove $500,000 from you, and apply random modifications (No Refunds on what you get)");
        SendClientMessageEx(playerid, COLOR_RED, "Warning: Also if this isn't a player owned car the modifications will not save,");
        SendClientMessageEx(playerid, COLOR_WHITE, "NOTE: Type the command again to continue.");
        IsWarned[playerid] = 1;
    }
    else
    {
        IsWarned[playerid] = 0;
        new vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        GivePlayerCash(playerid, -500000);
        TuneVehicleRandomly(vehicleid);
        //AddVehicleComponent(GetPlayerVehicleID(playerid),1080); dont want them to get gold rims also makes it less random- Shadow
        SendClientMessageEx(playerid, COLOR_WHITE, "You have randomly tuned this vehicle");
        SendClientMessageEx(playerid, COLOR_RED, "Remember to /park to make them save if its a player owned vehicle");
    }
    return 1;
}
i need someone to edit it so it wont work if they arent in the radius of X,Y,Z and also send a message if they aren't like erro not in range please help
Reply


Messages In This Thread
IsPlayerinrangeof point help - by NinjaChicken - 09.08.2012, 07:47
Re: IsPlayerinrangeof point help - by [GO]Hardstyle - 09.08.2012, 07:51
Re: IsPlayerinrangeof point help - by NinjaChicken - 09.08.2012, 07:58
Re: IsPlayerinrangeof point help - by Socan - 09.08.2012, 08:08
Re: IsPlayerinrangeof point help - by leonardo1434 - 09.08.2012, 08:15
Re: IsPlayerinrangeof point help - by Socan - 09.08.2012, 08:24
Re: IsPlayerinrangeof point help - by leonardo1434 - 09.08.2012, 08:27
Re: IsPlayerinrangeof point help - by Socan - 09.08.2012, 08:31
Re: IsPlayerinrangeof point help - by leonardo1434 - 09.08.2012, 08:41
Re: IsPlayerinrangeof point help - by Devilxz97 - 09.08.2012, 08:45

Forum Jump:


Users browsing this thread: 1 Guest(s)