Warning Help here
#3

pawn Код:
CMD:engine(playerid, params[])
{
    new
        giveplayerid,
        string[128],
        engine,
        lights,
        alarm,
        doors,
        bonnet,
        boot,
        objective,
        vehicleid = GetPlayerVehicleID(playerid);

    if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
    if(IsASateCar(vehicleid)) return SendClientMessage(playerid,COLOR_RED,"You need to hotwire this car.");

    if(CanTurnEngine[playerid] == 9999)
        return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");

    if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(engine == VEHICLE_PARAMS_ON) {
        SetVehicleEngine(vehicleid, playerid);
        format(string, sizeof(string), "* %s spins a key and turn the vehicle engine off", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)) {
        SetTimerEx("SetVehicleEngine", 3500, 0, "dd",  vehicleid, playerid);
        format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
}
Also, I don't recomment tabsize 0 because indentation is inportant in almost every computer language.
If you are using other languages too ,you will not be able to define it
Reply


Messages In This Thread
Warning Help here - by N0FeaR - 23.01.2012, 18:22
Re: Warning Help here - by Snowman12 - 23.01.2012, 18:24
Re: Warning Help here - by Konstantinos - 23.01.2012, 18:24
Re: Warning Help here - by lordturhan - 23.01.2012, 18:25
Re: Warning Help here - by N0FeaR - 23.01.2012, 21:17

Forum Jump:


Users browsing this thread: 1 Guest(s)