Jump to content
  • 0

Question

Posted

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));

11 answers to this question

Recommended Posts

  • 0
Posted (edited)
CMD:fly(playerid, params[]) {
    new string[180];
    format(string, sizeof(string), "{FFFFFF}[{ad0000}AdmWarning{FFFFFF}]: %s switched to fly mode.", GetName(playerid));
	SendClientMessage(playerid, -1, string);
	return 1;
}

trebuie facuta asa

 

Edited by Stefano
  • 0
Posted

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;
}

 

  • 0
Posted

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;
}

 

  • 0
Posted

Data viitoare cand faci un ss arata exact linia care e problema.. eroarea e pe linia x... dar daca tu ai mai scos sau adaugat ceva in gm se unde sa ne dam seama.. care e linia exacta, dar prima erroare si ultima e din cauza ca le.ai aranjat gresit de aici ar trb sa te descurci.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.