[Pomoc] Reklamator i Admin system


Započeo LoOdaK, April 28, 2015, 19:50:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moja
Detaljan opis problema:Ovako napravio sam ova dva sistema na isti princip tj samo varijable promenuo i napravio komandu /provera da mi proverava level reklamatora i admina i sve dobro radi ali kada kucam /makeadmin id i level 0  i ukucam /provera i nije mi skinulo admin level sa npr 6 na 0 nego ostalo je na 6 a isto tako i za reklamatora
Dio skripte: sta treba?
Neke slike/video za lakse dobivanje pomoci(neobavezno)://////////////////////////////////////////
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!




ADMIN KOMANDA
CMD:makeadmin(playerid, params[])
{
	new id,level,msg[128],msg1[128],name[MAX_PLAYER_NAME];
	if (PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, "Niste ovlasceni da koristite ovu komandu");
	if (PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, SIVA, "Niste ovlasceni da koristite ovu komandu");
	{
	    if(sscanf(params,"ud",id,level)) return SCM(playerid, SIVA,"Koristi: /makeadmin [id] [Level Admina]");
	    else if(level > 7) return SCM(playerid, WHITE,"[UB:RP] Najveci admin level je 7");
	    else if(level == 0) return SCM(id, WHITE,"[UB Administracija] Zao nam je ali vise niste admin.Vas admin level je skinut");
	    else
	    {
	        PlayerInfo[id][pAdmin] = level;
	        format(msg,sizeof(msg),"[UB Administracija] Cestitamo!! Postali ste Admin level: %d",level);
	        SCM(id, YELLOW,msg);
	        GetPlayerName(id,name,sizeof(name));
	        format(msg1,sizeof(msg1),"[UB:RP] Postavili ste igraca %s za Admina level: %d",name,level);
	        SCM(playerid, RED,msg1);
	    }
	}
	return 1;
}

REKLAMATOR KOMANDA
CMD:makereklamator(playerid, params[])
{
	new id,level,msg[128],msg1[128],name[MAX_PLAYER_NAME];
	if (PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, SIVA, "Niste ovlasceni da koristite ovu komandu");
	if (PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, SIVA, "Niste ovlasceni da koristite ovu komandu");
	{
	    if(sscanf(params,"ud",id,level)) return SCM(playerid, SIVA,"Koristi: /makereklamator [id] [Level reklamatora]");
	    else if(level > 2) return SCM(playerid, WHITE,"[UB:RP] Najveci reklamator level je 2");
	    else if(level == 0) return SCM(id, WHITE,"[UB Administracija] Zao nam je ali vise niste reklamator.Vas reklamator level je skinut");
	    else
	    {
	        PlayerInfo[id][pReklamator] = level;
	        format(msg,sizeof(msg),"[UB Administracija] Cestitamo!! Postali ste Reklamator level: %d",level);
	        SCM(id, YELLOW,msg);
	        GetPlayerName(id,name,sizeof(name));
	        format(msg1,sizeof(msg1),"[UB:RP] Postavili ste igraca %s za Reklamatora level: %d",name,level);
	        SCM(playerid, RED,msg1);
	    }
	}
	return 1;
}
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



CMD:makeadmin(playerid,params[])
{
	new id,level,msg[128],msg1[128],name[24];
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid, SIVA, "Niste ovlasceni da koristite ovu komandu");
	if(sscanf(params,"ud",id,level)) return SCM(playerid, SIVA,"Koristi: /makeadmin [id] [Level Admina]");
	else if(level > 7) return SCM(playerid, WHITE,"[UB:RP] Najveci admin level je 7");
	else if(level < 1)
	{
	    SCM(id, WHITE,"[UB Administracija] Zao nam je ali vise niste admin.Vas admin level je skinut");
	    PlayerInfo[id][pAdmin] = 0;
	    format(msg,sizeof(msg),"[UB Administracija] Nažalost !! VaÅ¡ admin level je skinut i sada iznosi : %d",level);
     	SCM(id, YELLOW,msg);
     	GetPlayerName(id,name,sizeof(name));
      	format(msg1,sizeof(msg1),"[UB:RP] Postavili ste igraca %s za Admina level: %d",name,level);
      	SCM(playerid, RED,msg1);
	}
	else
	{
	    PlayerInfo[id][pAdmin] = level;
	    format(msg,sizeof(msg),"[UB Administracija] Cestitamo!! Postali ste Admin level: %d",level);
     	SCM(id, YELLOW,msg);
     	GetPlayerName(id,name,sizeof(name));
      	format(msg1,sizeof(msg1),"[UB:RP] Postavili ste igraca %s za Admina level: %d",name,level);
      	SCM(playerid, RED,msg1);
	}
	return 1;
}
eto tako probaj ako bude uspjelo samo zamjeni varijable u reklamatora isto je sve ostalo
Poslednja Izmena: April 28, 2015, 21:50:03 POSLE PODNE od arnel avdic
~ Server Pernambucho Roleplay ~
Forum : ~ http://pernambucho.com/ ~
Facebook :~ https://www.facebook.com/events/331686430351597 ~

Owner : JA :D

Hvala radi LOCK
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!