SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 14/03/2011, 02:25 PM   #1
legodude
Gangsta
 
legodude's Avatar
 
Join Date: Sep 2009
Location: 127.0.0.1 duhh
Posts: 601
Reputation: 783
Default function doesnt work as i want it to work.

pawn Code:
forward CheckLevel(cmd[]);
public CheckLevel (cmd[])
{
    printf("%s",cmd);
    print("checklevel1");
    for(new i;i<216;i++)
    {
        if(!strcmp(cmd, Cmds[i][Name], true, strlen(cmd)))
        {
            print("checklevel2");
            printf("%s:%i",Cmds[i][Name],Cmds[i][Level]);
            return Cmds[i][Level];
        }
    }
    return 6;
}

forward LevelError(playerid,cmd[]);
public LevelError(playerid,cmd[])
{
    new str[128];
    printf("%s",cmd);
    print("LevelError1");
    format(str,sizeof(str),"ERROR:You need to be Administrator Level %d to use %s",CheckLevel(cmd),cmd);
    print("LevelError2");
    return SendClientMessage(playerid,red,str);
}
this doesnt work.
when i do /god (needs to be lvl 5.) i am lvl one. it just performs it. so it must be a fail in CheckLevel. but what??
help me!
__________________
legodude is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mta doesnt work THE_KNOWN Help Archive 1 23/02/2011 02:26 PM
Why doesnt this work? thimo Help Archive 10 08/02/2011 12:50 PM
0.3C doesnt work sjvt Help Archive 8 28/11/2010 06:48 PM
PM log doesnt work jonybomb Help Archive 2 26/07/2009 08:35 PM
I tried anything? but it doesnt work [BaRt] Client Support 8 25/06/2009 08:24 PM


All times are GMT. The time now is 10:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.