Jump to content

Problema /achievements


Eldhy

Recommended Posts

Salut din nou. Aceasta este o alta problema descoperita, cand scriu /achievmenets, respectiv /realizari, nu apare nimic.

 

YCMD:achievements(playerid, params[], help) {
	new szDialog[128], szDialog2[2000];
	strcat(szDialog2, "Achievement name\tStatus\n");
	for(new i = 0; i < 33; i++) {
		format(szDialog, sizeof(szDialog), "%s\t%s\n", achievementNames(i), (PlayerInfo[playerid][pAchievementStatus][i] == 1) ? ("{3DBF0A}Realizare completa") : ("{CC0E0E}Realizare incompleta"));
		strcat(szDialog2, szDialog);
	}
	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_TABLIST_HEADERS, "Achievements", szDialog2, "Select", "Cancel");
	return 1;
}
function finishAchievement(playerid, id) {
	if(PlayerInfo[playerid][pAchievementStatus][id] == 1) return 1;
	PlayerInfo[playerid][pAchievementStatus][id] = 1;
	SaveAchievements(playerid);

	new string[256], money = 25000 + random(5000);
	GivePlayerCash(playerid, money);
	PlayerInfo[playerid][pExp] ++;
	Update(playerid, pRP);
	
	format(string, sizeof(string), "(Achievements): {FFFFFF}Felicitari! Realizarea '%s' a fost deblocata.", achievementNames(id));
	SCM(playerid, 0x87E32BFF, string);
			
	format(string, sizeof(string), "~n~Realizare deblocata!~n~~y~\"%s\"~w~~h~~n~Ai primit: $%d si 1 respect point.~n~", achievementNames(id), money);
	PlayerTextDrawSetString(playerid, AchivPTD[0], string);
	PlayerTextDrawShow(playerid, AchivPTD[0]);
	TextDrawShowForPlayer(playerid, AchivTD[0]);
	TextDrawShowForPlayer(playerid, AchivTD[1]);
	
	SetTimerEx("HideTDAchiv", 10000, false, "i", playerid);
	return 1;
}
function HideTDAchiv(playerid) {
	PlayerTextDrawHide(playerid, AchivPTD[0]);
	TextDrawHideForPlayer(playerid, AchivTD[0]);
	TextDrawHideForPlayer(playerid, AchivTD[1]);
	return 1;
}
function UpdateVar2(playerid, varname[], amount) {
	if(playerid == INVALID_PLAYER_ID) return 1;
	new query[256];
	format(query, sizeof(query), "UPDATE `users` SET `%s`=`%s`+1 WHERE `ID`='%d'", varname, varname, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "", "");
	return 1;
}
function UpdateVar3(playerid, varname[]) {
	if(playerid == INVALID_PLAYER_ID) return 1;
	new query[256];
	format(query, sizeof(query), "UPDATE `users` SET `%s`=`%s`+1 WHERE `ID`='%d'", varname, varname, playerid);
	mysql_tquery(SQL, query, "", "");
	return 1;
}
function OpenCells() {
	new Float: Pos[3];
	for(new i = 0; i < 12; i++) {
		GetDynamicObjectPos(JailGate[i], Pos[0], Pos[1], Pos[2]);
		MoveDynamicObject(JailGate[i], Pos[0], Pos[1], Pos[2]-5, 2);
	}
	return 1;
}
function CloseCells() {
	new Float: Pos[3];
	for(new i = 0; i < 12; i++) {
		GetDynamicObjectPos(JailGate[i], Pos[0], Pos[1], Pos[2]);
		MoveDynamicObject(JailGate[i], Pos[0], Pos[1], 1770.986938, 2);
	}
	return 1;
}

 

Link to comment
Share on other sites

Acum 27 minute, Eldhy a spus:

Salut din nou. Aceasta este o alta problema descoperita, cand scriu /achievmenets, respectiv /realizari, nu apare nimic.

 


YCMD:achievements(playerid, params[], help) {
	new szDialog[128], szDialog2[2000];
	strcat(szDialog2, "Achievement name\tStatus\n");
	for(new i = 0; i < 33; i++) {
		format(szDialog, sizeof(szDialog), "%s\t%s\n", achievementNames(i), (PlayerInfo[playerid][pAchievementStatus][i] == 1) ? ("{3DBF0A}Realizare completa") : ("{CC0E0E}Realizare incompleta"));
		strcat(szDialog2, szDialog);
	}
	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_TABLIST_HEADERS, "Achievements", szDialog2, "Select", "Cancel");
	return 1;
}
function finishAchievement(playerid, id) {
	if(PlayerInfo[playerid][pAchievementStatus][id] == 1) return 1;
	PlayerInfo[playerid][pAchievementStatus][id] = 1;
	SaveAchievements(playerid);

	new string[256], money = 25000 + random(5000);
	GivePlayerCash(playerid, money);
	PlayerInfo[playerid][pExp] ++;
	Update(playerid, pRP);
	
	format(string, sizeof(string), "(Achievements): {FFFFFF}Felicitari! Realizarea '%s' a fost deblocata.", achievementNames(id));
	SCM(playerid, 0x87E32BFF, string);
			
	format(string, sizeof(string), "~n~Realizare deblocata!~n~~y~\"%s\"~w~~h~~n~Ai primit: $%d si 1 respect point.~n~", achievementNames(id), money);
	PlayerTextDrawSetString(playerid, AchivPTD[0], string);
	PlayerTextDrawShow(playerid, AchivPTD[0]);
	TextDrawShowForPlayer(playerid, AchivTD[0]);
	TextDrawShowForPlayer(playerid, AchivTD[1]);
	
	SetTimerEx("HideTDAchiv", 10000, false, "i", playerid);
	return 1;
}
function HideTDAchiv(playerid) {
	PlayerTextDrawHide(playerid, AchivPTD[0]);
	TextDrawHideForPlayer(playerid, AchivTD[0]);
	TextDrawHideForPlayer(playerid, AchivTD[1]);
	return 1;
}
function UpdateVar2(playerid, varname[], amount) {
	if(playerid == INVALID_PLAYER_ID) return 1;
	new query[256];
	format(query, sizeof(query), "UPDATE `users` SET `%s`=`%s`+1 WHERE `ID`='%d'", varname, varname, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "", "");
	return 1;
}
function UpdateVar3(playerid, varname[]) {
	if(playerid == INVALID_PLAYER_ID) return 1;
	new query[256];
	format(query, sizeof(query), "UPDATE `users` SET `%s`=`%s`+1 WHERE `ID`='%d'", varname, varname, playerid);
	mysql_tquery(SQL, query, "", "");
	return 1;
}
function OpenCells() {
	new Float: Pos[3];
	for(new i = 0; i < 12; i++) {
		GetDynamicObjectPos(JailGate[i], Pos[0], Pos[1], Pos[2]);
		MoveDynamicObject(JailGate[i], Pos[0], Pos[1], Pos[2]-5, 2);
	}
	return 1;
}
function CloseCells() {
	new Float: Pos[3];
	for(new i = 0; i < 12; i++) {
		GetDynamicObjectPos(JailGate[i], Pos[0], Pos[1], Pos[2]);
		MoveDynamicObject(JailGate[i], Pos[0], Pos[1], 1770.986938, 2);
	}
	return 1;
}

 

arata server.log

YouTube : Click

Discord : CosminAK47#8524

Link to comment
Share on other sites

Asta apare cand tastez

 

[debug] AMX backtrace:
[10:03:14] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:03:14] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:03:14] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:03:14] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:03:14] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:03:14] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:03:58] [debug] Run time error 4: "Array index out of bounds"
[10:03:58] [debug]  Accessing element at index 32 past array upper bound 31
[10:03:58] [debug] AMX backtrace:
[10:03:58] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:03:58] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:03:58] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:03:58] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:03:58] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:03:58] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:04:17] [debug] Run time error 4: "Array index out of bounds"
[10:04:17] [debug]  Accessing element at index 32 past array upper bound 31
[10:04:17] [debug] AMX backtrace:
[10:04:17] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:04:17] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:04:17] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:04:17] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:04:17] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:04:17] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:04:19] [debug] Run time error 4: "Array index out of bounds"
[10:04:19] [debug]  Accessing element at index 32 past array upper bound 31
[10:04:19] [debug] AMX backtrace:
[10:04:19] [debug] #0 002932e0 in public @_yCachievements (0, 60404612, 0) from b4p.amx
[10:04:19] [debug] #1 002931c0 in public @yC_achievements (0, 60404612, 0, 0) from b4p.amx
[10:04:19] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:04:19] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:04:19] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:04:19] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx

 

Link to comment
Share on other sites

Acum 39 minute, Eldhy a spus:

Asta apare cand tastez

 


[debug] AMX backtrace:
[10:03:14] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:03:14] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:03:14] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:03:14] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:03:14] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:03:14] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:03:58] [debug] Run time error 4: "Array index out of bounds"
[10:03:58] [debug]  Accessing element at index 32 past array upper bound 31
[10:03:58] [debug] AMX backtrace:
[10:03:58] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:03:58] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:03:58] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:03:58] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:03:58] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:03:58] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:04:17] [debug] Run time error 4: "Array index out of bounds"
[10:04:17] [debug]  Accessing element at index 32 past array upper bound 31
[10:04:17] [debug] AMX backtrace:
[10:04:17] [debug] #0 002932e0 in public @_yCachievements (0, 60404624, 0) from b4p.amx
[10:04:17] [debug] #1 002931c0 in public @yC_achievements (0, 60404624, 0, 0) from b4p.amx
[10:04:17] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:04:17] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:04:17] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:04:17] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx
[10:04:19] [debug] Run time error 4: "Array index out of bounds"
[10:04:19] [debug]  Accessing element at index 32 past array upper bound 31
[10:04:19] [debug] AMX backtrace:
[10:04:19] [debug] #0 002932e0 in public @_yCachievements (0, 60404612, 0) from b4p.amx
[10:04:19] [debug] #1 002931c0 in public @yC_achievements (0, 60404612, 0, 0) from b4p.amx
[10:04:19] [debug] #2 native CallRemoteFunction () from samp-server.exe
[10:04:19] [debug] #3 00036f14 in ?? (0, 60404568, 0) from b4p.amx
[10:04:19] [debug] #4 00036758 in ?? (0, 60404568) from b4p.amx
[10:04:19] [debug] #5 00029124 in public OnPlayerCommandText (0, 60404568) from b4p.amx

 

Mareste limita la achievements

YouTube : Click

Discord : CosminAK47#8524

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
Reply to this topic...

×   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.