Only level 7 or higher
#1

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;

Reply
#2

What's your account saving ?

like:

enum pPlayer or ?
Reply
#3

sInfo = sNiveau

Niveau is Level
Reply
#4

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

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) {

}
Reply
#6

Thanks i try
Reply
#7

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.
Reply
#8

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

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!");  
    }  
        }
    } 
Reply
#10

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

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

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)