[Help] I NEED SOLVE THIS TO CONTINUEEEEEEEE - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] I NEED SOLVE THIS TO CONTINUEEEEEEEE (
/showthread.php?tid=68178)
[Help] I NEED SOLVE THIS TO CONTINUEEEEEEEE -
Hot - 07.03.2009
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.
Re: [Help] Unknown Command And Work -
Zoopaman - 07.03.2009
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
Re: [Help] Unknown Command And Work -
Hot - 08.03.2009
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

.
Re: [Help] Unknown Command And Work -
Hot - 08.03.2009
HELP
Re: [Help] I NEED SOLVE THIS TO CONTINUEEEEEEEE -
Guziiinho - 08.03.2009
Maybe if you add some brackets, idk ...