Jump to content
  • 0

Problema /givesalary


BaD_bOy_MD

Question

Mesajele vin dar banii nu ajutor prima data ma intilnesc cu asa problema

if(strcmp(cmd, "/givesalary", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, "Nu ai acces!");
            SendClientMessageToAll(0x046C8FFF , "(AdmBot): In acest moment, salariile au fost acordate celor care fac parte dintr-o factiune.");
            new salar[MAX_PLAYERS];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[playerid][pRank] >= 1)
                    {
                        salar = PlayerInfo[pRank] * 100000;
                        format(string, sizeof(string), "Salariul a sosit! ai primit %s Lei", FormatNumber(salar));
                        SCM(i, COLOR_MONEY, string);
                    }
                }
            }
        }
        return 1;
    }

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
if(strcmp(cmd, "/givesalary", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, "Nu ai acces!");
            SendClientMessageToAll(0x046C8FFF , "(AdmBot): In acest moment, salariile au fost acordate celor care fac parte dintr-o factiune.");
            new salar[MAX_PLAYERS];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[playerid][pRank] >= 1)
                    {
                        salar = PlayerInfo[pRank] * 100000;
                        format(string, sizeof(string), "Salariul a sosit! ai primit %s Lei", FormatNumber(salar));
                        SCM(i, COLOR_MONEY, string);
						GivePlayerCash(i, salar);
                    }
                }
            }
        }
        return 1;
    }

Incaraca asa .

Link to comment
Share on other sites

  • 0

 

if(strcmp(cmd, "/givesalary", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, "Nu ai acces!");
            SendClientMessageToAll(0x046C8FFF , "(AdmBot): In acest moment, salariile au fost acordate celor care fac parte dintr-o factiune.");
            new salar[MAX_PLAYERS];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][pMember] >= 1)
                {
                     salar = PlayerInfo[i][pRank] * 100000;
                     format(string, sizeof(string), "Salariul a sosit! ai primit %s Lei", FormatNumber(salar));
                     SCM(i, COLOR_MONEY, string);
					 GivePlayerCash(i, salar);
                }
             }
        }
        return 1;
    }

 

Retras

Link to comment
Share on other sites

  • 0
Acum 1 oră, Mafia. a spus:

if(strcmp(cmd, "/givesalary", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, "Nu ai acces!");
            SendClientMessageToAll(0x046C8FFF , "(AdmBot): In acest moment, salariile au fost acordate celor care fac parte dintr-o factiune.");
            new salar[MAX_PLAYERS];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[playerid][pRank] >= 1)
                    {
                        salar = PlayerInfo[pRank] * 100000;
                        format(string, sizeof(string), "Salariul a sosit! ai primit %s Lei", FormatNumber(salar));
                        SCM(i, COLOR_MONEY, string);
						GivePlayerCash(i, salar);
                    }
                }
            }
        }
        return 1;
    }

Incaraca asa .

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19131) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19134) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

Link to comment
Share on other sites

  • 0
Acum 32 minute, Tud0r. a spus:

 


if(strcmp(cmd, "/givesalary", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, "Nu ai acces!");
            SendClientMessageToAll(0x046C8FFF , "(AdmBot): In acest moment, salariile au fost acordate celor care fac parte dintr-o factiune.");
            new salar[MAX_PLAYERS];
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][pMember] >= 1)
                {
                     salar = PlayerInfo[i][pRank] * 100000;
                     format(string, sizeof(string), "Salariul a sosit! ai primit %s Lei", FormatNumber(salar));
                     SCM(i, COLOR_MONEY, string);
					 GivePlayerCash(i, salar);
                }
             }
        }
        return 1;
    }

 

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19129) : error 033: array must be indexed (variable "salar")
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19134) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

 

 

Link to comment
Share on other sites

  • 0
19 minutes ago, BaD_bOy_MD said:

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19129) : error 033: array must be indexed (variable "salar")
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19134) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

 

 

salar[playerid] = PlayerInfo[i][pRank] * 100000;

 

Retras

Link to comment
Share on other sites

  • 0
Acum 2 minute, Tud0r. a spus:

salar[playerid] = PlayerInfo[i][pRank] * 100000;

 

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19130) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 2)

Link to comment
Share on other sites

  • 0
Just now, BaD_bOy_MD said:

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19130) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 2)

Da codul.

Retras

Link to comment
Share on other sites

  • 0
1 hour ago, BaD_bOy_MD said:

C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19130) : error 035: argument type mismatch (argument 1)
C:\Users\User\Desktop\X-ENerGy\gamemodes\X-ENerGy.pwn(19132) : error 035: argument type mismatch (argument 2)

incearca sa modifici salar [playerid] cu salar

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.