[Pomoc] Ban

Započeo Milos25, Oktobar 07, 2012, 21:34:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Extreme Edit
Opis problema: Kad nekog ban srw ili admin igracu se obrise akaunt kako mogu to da popravim
Trazim Mapera

kopiraj iz nekog moda taj system i miran si

daj komandu /ban

"They have computers, and they may have other weapons of mass destruction."

Vegas.

Account se zaključa, ne obriše.

Nzm sta bude

Al uglavnom kad prodje ban igrac nema nista ( Kucu,lvl,pare... )

if(strcmp(cmd, "/ban", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ban [ID Igraca/Dio Imena] [razlog]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (PlayerInfo[playerid][pOSC] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					if(PlayerInfo[giveplayerid][pOSC] >= 1340)
					{
						SendClientMessage(playerid, COLOR_GRAD2, "Ne mozete banovati ownera");
						return 1;
					}
			        if(giveplayerid != INVALID_PLAYER_ID)
			        {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ban [ID Igraca/Dio Imena] [razlog]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "AdmCmd: %s je banovan od: %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						BanLog(string);
						format(string, sizeof(string), "AdmCmd: %s je banovan od: %s, razlog: %s", giveplayer, sendername, (result));
						SendClientMessageToAll(COLOR_LIGHTRED, string);
						PlayerInfo[giveplayerid][pLocked] = 1;
						Ban(giveplayerid);
						return 1;
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
Trazim Mapera

Vegas.

PlayerInfo[giveplayerid][pLocked] = 1;
Taj dio locka igračev acc.. Uradi po dockovom tutorialu i nećeš imat problema.