Jump to content
  • 0

pica serverul


TeA

Question

Problema intalnita (descriere): pica serverul
Ero(area / rile) / warning-(ul / urile):  de fiecare data cand scrie /votelideron pica serverul .

CMD:votelideron(playerid,params[])
{
    if(IsPlayerConnected(playerid))
		{
			if (PlayerInfo[playerid][pAdmin] >= 5) 
			{	
				if(VoteLider == 0)
				{
					SendClientMessageToAll(COLOR_RED, " Adminul %s a activat comanda /votelider. Pentru a vota tastati /votelider id.");
					VoteLider = 1;
				}
				else 
				{
				SendClientMessage(playerid, COLOR_RED, " Este deja o votare in desfaurare.");
				}
			}
			else
			{
			SendClientMessage(playerid, COLOR_RED, " Nu ai gradul necesar pentru a folosi aceasta comanda.");
			}
		}
	return 1;
}
CMD:votelideroff(playerid,params[])
{
    if(IsPlayerConnected(playerid))
		{
			if (PlayerInfo[playerid][pAdmin] >= 5) 
			{
				if(VoteLider == 1)
				{
					SendClientMessageToAll(COLOR_RED, " Adminul %s a dezactivat comanda /votelider.");
					VoteLider = 0;
				}
				else 
				{
				SendClientMessage(playerid, COLOR_RED, " Votare este deja incheiata.");
				}
			}
			else
			{
			SendClientMessage(playerid, COLOR_RED, " Nu ai gradul necesar pentru a folosi aceasta comanda.");
			}
		}
	return 1;
}


Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:  da 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

 

[debug] Server crashed while executing AZone.amx
[17:12:47] [debug] AMX backtrace:
[17:12:47] [debug] #0 native SendClientMessageToAll () from samp03svr
[17:12:47] [debug] #1 00133878 in public cmd_votelider (0, 105450596) from AZone.amx
[17:12:47] [debug] #2 native CallLocalFunction () from samp03svr
[17:12:47] [debug] #3 00008424 in public OnPlayerCommandText (0, 105450540) from AZone.amx
[17:12:47] [debug] Native backtrace:
[17:12:47] [debug] #0 b73d9e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[17:12:47] [debug] #1 b73d2bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[17:12:47] [debug] #2 b73d3dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[17:12:47] [debug] #3 b73d4226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[17:12:47] [debug] #4 b73d9adc in ?? () from plugins/crashdetect.so
[17:12:47] [debug] #5 b76f1600 in ?? ()
[17:12:47] [debug] #6 b7476ba1 in ?? () from /lib/libc.so.6
[17:12:47] [debug] #7 b744122f in _IO_vfprintf () from /lib/libc.so.6
[17:12:47] [debug] #8 b74606bc in vsprintf () from /lib/libc.so.6
[17:12:47] [debug] #9 080add67 in ?? () from ./samp03svr
[17:12:47] [debug] #10 080d9e51 in ?? () from ./samp03svr
[17:12:47] [debug] #11 080950e4 in ?? () from ./samp03svr
[17:12:47] [debug] #12 b73d594b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[17:12:47] [debug] #13 b73d88f8 in ?? () from plugins/crashdetect.so
[17:12:47] [debug] #14 b73dc916 in amx_Exec () from plugins/crashdetect.so
[17:12:47] [debug] #15 b73d4be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[17:12:47] [debug] #16 b73d8659 in ?? () from plugins/crashdetect.so
[17:12:47] [debug] #17 b61892ea in ?? () from plugins/streamer.so
[17:12:47] [debug] #18 080dfd62 in ?? () from ./samp03svr
[17:12:47] [debug] #19 080950e4 in ?? () from ./samp03svr
[17:12:47] [debug] #20 b73d594b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[17:12:47] [debug] #21 b73d88f8 in ?? () from plugins/crashdetect.so
[17:12:47] [debug] #22 b73dc916 in amx_Exec () from plugins/crashdetect.so
[17:12:47] [debug] #23 b73d4be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[17:12:47] [debug] #24 b73d8659 in ?? () from plugins/crashdetect.so
[17:12:47] [debug] #25 b61892ea in ?? () from plugins/streamer.so
[17:12:47] [debug] #26 080a5632 in ?? () from ./samp03svr
[17:12:47] [debug] #27 080b1751 in ?? () from ./samp03svr
[17:12:47] [debug] #28 08071d38 in ?? () from ./samp03svr
[17:12:47] [debug] #29 08071e32 in ?? () from ./samp03svr
[17:12:47] [debug] #30 0807bc50 in ?? () from ./samp03svr
[17:12:47] [debug] #31 080aed3d in ?? () from ./samp03svr
[17:12:47] [debug] #32 080aef02 in ?? () from ./samp03svr
[17:12:47] [debug] #33 080aa13a in ?? () from ./samp03svr
[17:12:47] [debug] #34 b7413d26 in __libc_start_main () from /lib/libc.so.6
[17:12:47] [debug] #35 0804b4e1 in ?? () from ./samp03svr

 

Edited by TeA
Link to comment
Share on other sites

  • 0

Ai omis multi parametrii, comanda nu este optimizata, cat despre cum ai formatat stringul de la /VoteLiderOn , nu mai zic. Ai uitat sa treci stringul care contine numele jucatorului.

Incearca asta: http://pastebin.com/2YwmvXiN

P.S: La /VoteLiderOff, trebuie sa formatezi la fel stringul. Bafta.

Edited by HONNOR
Link to comment
Share on other sites

  • 0

 

Aici e problema :

SendClientMessageToAll(COLOR_RED, " Adminul %s a activat comanda /votelider. Pentru a vota tastati /votelider id.");

incearca asa in locul la ce am pus mai sus:

new string[256];

format(string, sizeof(string), "Adminul %s a activat comanda /votelider. Pentru a vota tastati /votelider id.", GetName(playerid));

SendClientMessageToAll(COLOR_RED, string);

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.