Can't get this to work for the life of me
#4

PHP код:
CMD:towcar(playeridparams[])
{
    new 
vehicleid;

    if (
sscanf(params"d"vehicleid))
        return 
SendSyntaxMessage(playerid"/towcar [veh]");

    if (
vehicleid || vehicleid MAX_VEHICLES || !IsValidVehicle(vehicleid))
        return 
SendErrorMessage(playerid"You have specified an invalid vehicle ID.");

    if (
Car_IsOwner(playeridvehicleid)) {
        
RespawnVehicle(vehicleid);
        
Car_Save(vehicleid);
        
SendServerMessage(playerid"You have respawned vehicle ID: %d."vehicleid);
        
GiveMoney(playerid, -500);
    } else {
        
SendErrorMessage(playerid"You cannot respawn a car that you do not own."); 
    }
    return 
1;

I was just thinking of "How can player even know his car's id?".
Reply


Messages In This Thread
Can't get this to work for the life of me - by Luke_James - 22.08.2015, 18:22
Re: Can't get this to work for the life of me - by thaKing - 22.08.2015, 18:28
Re: Can't get this to work for the life of me - by Luke_James - 22.08.2015, 18:32
Re: Can't get this to work for the life of me - by thaKing - 22.08.2015, 18:50
Re: Can't get this to work for the life of me - by Bingo - 22.08.2015, 18:56
Re: Can't get this to work for the life of me - by thaKing - 22.08.2015, 19:04
Re: Can't get this to work for the life of me - by Luke_James - 22.08.2015, 19:51
Re: Can't get this to work for the life of me - by Luke_James - 22.08.2015, 19:53

Forum Jump:


Users browsing this thread: 1 Guest(s)