SA-MP Forums Archive
Only level 7 or higher - 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: Only level 7 or higher (/showthread.php?tid=276290)



Only level 7 or higher - svaba - 13.08.2011

Hey, i want to make this possible only to players with 7+ level

PHP код:
CMD:waffenlager(playerid,params[])
{
    if(
IsPlayerInRangeOfPoint(playerid3.0,-251.6501,4355.1094,88.7158))
    {
        
ShowPlayerDialog(playeridWAFFENLAGER_DIALOGDIALOG_STYLE_LIST"Waffenlager","Knife\nDeagle\nMP5\nM4\nAK47\nSniper","Nehmen","");
    }
    else
    {
        
SendClientMessage(playeridFARBE_ROT"Du stehst nicht neben den Waffenlager!");
        return 
1;
    }
    return 
1;




Re: Only level 7 or higher - Meinstad - 13.08.2011

What's your account saving ?

like:

enum pPlayer or ?


Re: Only level 7 or higher - svaba - 13.08.2011

sInfo = sNiveau

Niveau is Level


Re: Only level 7 or higher - emokidx - 13.08.2011

pawn Код:
if(sInfo[Niveau]) >= 7) {
//rest here
}



Re: Only level 7 or higher - Meinstad - 13.08.2011

Try to use:

PHP код:
CMD:waffenlager(playerid,params[]) 

    if(
IsPlayerInRangeOfPoint(playerid3.0,-251.6501,4355.1094,88.7158)) 
    { 
        
ShowPlayerDialog(playeridWAFFENLAGER_DIALOGDIALOG_STYLE_LIST"Waffenlager","Knife\nDeagle\nMP5\nM4\nAK47\nSniper","Nehmen",""); 
    } 
    else if(
sInfo[Niveau]) >= 7) {
    { 
        
SendClientMessage(playeridFARBE_ROT"Du stehst nicht neben den Waffenlager!"); 
        return 
1
    } 
    return 
1

if(sInfo[Niveau]) >= 7) {

}


Re: Only level 7 or higher - svaba - 13.08.2011

Thanks i try


Re: Only level 7 or higher - svaba - 13.08.2011

C:\Users\Stefanche16\Downloads\samp03csvr_R5_win32 \gamemodes\dvi2.pwn(2936) : error 028: invalid subscript (not an array or too many subscripts): "sInfo"
C:\Users\Stefanche16\Downloads\samp03csvr_R5_win32 \gamemodes\dvi2.pwn(2936) : warning 215: expression has no effect
C:\Users\Stefanche16\Downloads\samp03csvr_R5_win32 \gamemodes\dvi2.pwn(2936) : error 001: expected token: ";", but found "]"
C:\Users\Stefanche16\Downloads\samp03csvr_R5_win32 \gamemodes\dvi2.pwn(2936) : error 029: invalid expression, assumed zero
C:\Users\Stefanche16\Downloads\samp03csvr_R5_win32 \gamemodes\dvi2.pwn(2936) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: Only level 7 or higher - emokidx - 13.08.2011

as far as i see
you missed one ";"
and i think you dont have the enum?


Re: Only level 7 or higher - Meinstad - 13.08.2011

Try
PHP код:
if(sInfo[Niveau]) >= 7) { 
    {
if(
IsPlayerInRangeOfPoint(playerid3.0,-251.6501,4355.1094,88.7158))  
    {  
        
ShowPlayerDialog(playeridWAFFENLAGER_DIALOGDIALOG_STYLE_LIST"Waffenlager","Knife\nDeagle\nMP5\nM4\nAK47\nSniper","Nehmen","");  
    }  
        else
        {
SendClientMessage(playeridFARBE_ROT"Du stehst nicht neben den Waffenlager!");  
    }  
        }
    } 



Re: Only level 7 or higher - Admigo - 13.08.2011

change else if(sInfo[Niveau]) >= 7) { to else if(sInfo[Niveau] >= 7) {


Re: Only level 7 or higher - Meinstad - 13.08.2011

Quote:
Originally Posted by admigo
Посмотреть сообщение
change else if(sInfo[Niveau]) >= 7) { to else if(sInfo[Niveau] >= 7) {
What's the difference ?


Re: Only level 7 or higher - emokidx - 13.08.2011

Quote:
Originally Posted by admigo
Посмотреть сообщение
change else if(sInfo[Niveau]) >= 7) { to else if(sInfo[Niveau] >= 7) {
EDIT: sorry,, my eyes just got weak 0.0

btw,, that code will do the same thing..