[Help] I NEED SOLVE THIS TO CONTINUEEEEEEEE
#1

I use a passworded skin system but when I unlock it with the pass It says Unknown Command but it Works!

At the top:

Код:
new bool:Locked[MAX_PLAYERS];
Passwroded Skins at OnPlayerRequestClass:

Код:
if(classid==stars1){
GameTextForPlayer(playerid,"~b~~h~S.T.A.R.S ONLY",1000,3);
gTeam[playerid] = STARS;
Locked[playerid] = true;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==stars2){
GameTextForPlayer(playerid,"~b~~h~S.T.A.R.S ONLY",1000,3);
gTeam[playerid] = STARS;
Locked[playerid] = true;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==stars3){
GameTextForPlayer(playerid,"~b~~h~S.T.A.R.S ONLY",1000,3);
gTeam[playerid] = STARS;
Locked[playerid] = true;
SetPlayerColor(playerid,COLOR_BLUE);}

if(classid==stars4){
GameTextForPlayer(playerid,"~b~~h~S.T.A.R.S ONLY",1000,3);
gTeam[playerid] = STARS;
Locked[playerid] = true;
SetPlayerColor(playerid,COLOR_BLUE);}
At OnPlayerSpawn:

Код:
	if(bool:Locked[playerid] == true) //If player's current class is locked,
	{ //then..
		ForceClassSelection(playerid); //force him to selection menu
		SetPlayerHealth(playerid, 0);
		return 1;
	}
	else
	{
		return 1;
	}
At OnPlayerCommandText:

Код:
	if(strcmp(cmdtext, "/unlock mypass") == 0)//YOUR_PASS is different than YouR_PaSS
	{
		Locked[playerid] = false;
	}
Warning :

Код:
C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\BioVirus.pwn(233) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warnings.
Reply
#2

its ugly hard to find a single error if you post your whole gamemode - besides i can steal your code ^^

since it says "unreachable code", probably you have obe unneeded return somewhere in that faulty line
Reply
#3

Now you can't see my whole code. But I find the problem and I take off the return 1;

But it still give me [SERVER]Unknown command .
Reply
#4

HELP
Reply
#5

Maybe if you add some brackets, idk ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)