Help with gangsterlevel!
#1

Hi! I need help, I want to make gangsterlevel, and I want that they increase the respect +10 points! The respect points should go until 100, GODFATHER THEN! And the most important thing: The levels(OG, ...) should be written beside the playername in the game!!!

pawn Код:
CMD:og(playerid, params[])
{
    new gangsterrank[MAX_PLAYER_NAME], new gangsterlevel, id;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if (sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        GetPlayerName(id, gangstername, sizeof(gangstername));
        new str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i",adminname, playerid, gangsterrank, id, gangsterlevel);
        SendClientMessage(playerid,COLOR_YELLOW,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
}
Well, it isn't finished yet, and I dunno how to continue....Can you help me?

It gives me also 7 errors!

Код:
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(106) : error 001: expected token: "-identifier-", but found "new"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(109) : error 017: undefined symbol "id"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(110) : error 017: undefined symbol "id"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 017: undefined symbol "id"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 017: undefined symbol "gangstername"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 029: invalid expression, assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#2

PHP код:
CMD:og(playeridparams[])
{
    new 
gangsterrank[MAX_PLAYER_NAME], gangsterlevelid;
    if(
PlayerInfo[playerid][pAdmin] >= 3)
    {
        if (
sscanf(params"ui"idgangsterlevel)) return SendClientMessage(playeridCOLOR_RED"USAGE: /set_glevel [id] [gangsterlevel]");
        if (
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"System: Invalid ID");
        
GetPlayerName(idgangsternamesizeof(gangstername));
        new 
str[128];
        
format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i",adminnameplayeridgangsterrankidgangsterlevel);
        
SendClientMessage(playerid,COLOR_YELLOW,str);
        return 
1;
    }
    else return 
SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");

Reply
#3

PHP код:
GetPlayerName(idgangsternamesizeof(gangstername)); 
Why did u set this to gangstername?
Reply
#4

Still 4 errors:

Код:
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 017: undefined symbol "gangstername"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 017: undefined symbol "gangstername"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : error 029: invalid expression, assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(111) : fatal error 107: too many error messages on one line

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


4 Errors.
PHP код:
GetPlayerName(idgangsternamesizeof(gangstername)); 
I really dunno from where he has got gangstername!
Reply
#5

pawn Код:
CMD:og(playerid, params[])
{
    new gangstername[MAX_PLAYER_NAME],adminname[MAX_PLAYER_NAME];
    new gangsterlevel, id;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if (sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        GetPlayerName(id, gangstername, sizeof(gangstername));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i%s",adminname, playerid, gangstername, id, gangsterlevel,((gangsterlevel >= 100) ? "(GODFATHER)" : "") );
        SendClientMessageToAll(COLOR_YELLOW,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
}
Reply
#6

Ty, but how to save players respect points and increasing?
Reply
#7

Can anybody help me?
Reply
#8

Any help pls? Have to know this thing with respect!
Reply
#9

Use the GF respect points system if you want a such one. But if you want a kind of status with respect then tell me which saving system you use and I might help you.
Reply
#10

Yo gangsta!

I am using SII include, here is my script! Can u help me with that respect? It will give u also 1 error with OG command!
But I want, that the rank of the player is under his name in the game, too!

For example, u see me in the game, under my name is:
samtey
OG

And increasing respect is important, too! So far +10 by OG

But what is GF?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)