Jump to content
  • 0

bug comanda /fly


caltabos

Question

salut am si eu un "bug" la comanda fly, am adaugat sa arata cand esti in flymode dar nu scire pe chat cand dai!! am gresit la new string? de fiecare data am probleme cu string-urile

CMD:fly(playerid, params[]) {
    new string[180];
    format(string, sizeof(string), "{FFFFFF}[{ad0000}AdmWarning{FFFFFF}]: %s switched to fly mode.", GetName(playerid));

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

foloseste asta daca nu o ai.

function SendAdminMessage(color,const string[],level) {
	new text[180];
	foreach(Player, i) {
	    if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
			if(IsPlayerLogged[i] == 1) {
				if(PlayerInfo[i][pAdmin] >= level) {
					format(text, 256, string);
					SCM(i, color, text);
				}
			}
		}
	}
	printf("%s", string);
	return 1;
}

 

Link to comment
Share on other sites

  • 0

Imi da

E:\Gamemodes\burned.ro\gamemodes\GM.pwn(25452) : warning 217: loose indentation
E:\Gamemodes\burned.ro\gamemodes\GM.pwn(25454) : warning 225: unreachable code
E:\Gamemodes\burned.ro\gamemodes\GM.pwn(25454) : warning 217: loose indentation

 

Spoiler

CMD:fly(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 1) return 1;
    if(InRaceArena[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 7) return SCM(playerid, COLOR_LGREEN, "Nu ai voie sa folosesti aceasta comanda atata timp cat esti in arena de curse!");
    if(IsPlayerInAnyVehicle(playerid)) {
        new Float: x, Float:y, Float:z;
        GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);        
        SetVehicleVelocity(GetPlayerVehicleID(playerid),x, y, z + 0.5);    
        return 1;
    }
    new string[100];
    format(string, sizeof(string), "{FFFFFF}[{ad0000}AdmWarning{FFFFFF}]: %s switched to fly mode.", GetName(playerid));
        SendAdminMessage(COLOR_WARNING, string, 1);
        return 1;
    if(UsedFly[playerid] == 0) {
        if(InGame[playerid] == 1) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece esti in arena! Foloseste comanda /leavearena pentru a iesi.");
        StartFly(playerid);
        UsedFly[playerid] = 1;
        SetPlayerHealthEx(playerid, 100000000);
    }
    else if(UsedFly[playerid] == 1) {
        StopFly(playerid);
        UsedFly[playerid] = 0;
        SetPlayerHealthEx(playerid, 99);
        SendClientMessage(playerid, 0xFFADADFF, "Fly mode off.");
    }
    return 1;
}
    
function SaveMissions(playerid) {
    Update(playerid, pDailyMissionx);
    Update(playerid, pDailyMission2x);
    Update(playerid, pProgressx);
    Update(playerid, pProgress2x);
    return 1;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.