No msg
#1

Why at this command when I turn engine OFF it doesn't send the message?

pawn Код:
if(strcmp(cmdtext, "/engine", true) == 0)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new e,l,a,d,b,bo,o;
        GetVehicleParamsEx(vehicleid,e,l,a,d,b,bo,o);
        GetPlayerName(playerid, sendername, sizeof(sendername));
       
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}You need to be in vehicle to use this command.");
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}You need to be driver to use this command.");
        if(Carinfo[vehicleid][F] < 1) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}This vehicle is out of fuel.");
        if(ES[playerid] == 1) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}You are already starting your engine.");
        if(NoFuel(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}You can't do that on this vehicle.");
        if(e == 1) {
            KillTimer(GasTimer[playerid]);
            SetVehicleParamsEx(vehicleid,0,l,a,d,b,bo,o);
            TextDrawHideForPlayer(playerid, vName[playerid]);
            TextDrawHideForPlayer(playerid, vSpeed[playerid]);
            TextDrawHideForPlayer(playerid, vGear[playerid]);
            TextDrawHideForPlayer(playerid, vHP[playerid]);
            TextDrawHideForPlayer(playerid, vFuel[playerid]);
            TextDrawHideForPlayer(playerid, HP[playerid]);
            TextDrawHideForPlayer(playerid, Speed[playerid]);
            TextDrawHideForPlayer(playerid, Gear[playerid]);
            TextDrawHideForPlayer(playerid, Veh[playerid]);
            TextDrawHideForPlayer(playerid, Fuel[playerid]);
            if(Masked[playerid] == 1) format(string, sizeof(string), "Stranger_%d spins the key and turns engine off.",maskid[playerid]);
            else format(string, sizeof(string), "%s spins the key and turns engine off.",sendername);
            return 1;
        } else {
            if(Masked[playerid] == 1) format(string, sizeof(string), "Stranger_%d inserts a key in ingition and twists it, turning engine on.",maskid[playerid]);
            else format(string, sizeof(string), "*%s inserts a key in ingition and twists it, turning engine on.", sendername);
            ProxDetector(8.0, playerid, string,0x33CCFFAA,0x33CCFFAA,0x33CCFFAA,0x33CCFFAA,0x33CCFFAA);
           
            ES[playerid] = 1;
            EngTimer[playerid] = SetTimerEx("EngStart", 4000, false, "d", playerid);
            return 1;
        }
    }
This msg:
pawn Код:
if(Masked[playerid] == 1) format(string, sizeof(string), "Stranger_%d spins the key and turns engine off.",maskid[playerid]);
            else format(string, sizeof(string), "%s spins the key and turns engine off.",sendername);
Reply
#2

Ehm..and where are you sending it? Format != SendClientMessage

pawn Код:
if(Masked[playerid] == 1) format(string, sizeof(string), "Stranger_%d spins the key and turns engine off.",maskid[playerid]);
            else format(string, sizeof(string), "%s spins the key and turns engine off.",sendername);
return SendClientMessage(playerid, -1, string);
Reply
#3

Oh god I didn't noticed that I forgot to send it to ProxDetector haha, thank you rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)