command to make someone donator?
#1

pawn Код:
if (strcmp("/makevip", cmdtext, true, 10) == 0)
    {
        IsPlayerAdmin(playerid);
        {
            if(Donator[playerid]==1)
            SendClientMessage(playerid,COLOR_RED,"This person is already a donator!);
            }
            else
            {
            if(Donator[playerid]==0)
            }
        return 1;
    }
this is all i have so far, got confused + i dont think it works.

any help?
Reply
#2

Код:
if (strcmp("/makevip", cmdtext, true, 10) == 0)
    {
        IsPlayerAdmin(playerid);
        {
            if(Donator[playerid]==1)
            SendClientMessage(playerid,COLOR_RED,"This person is already a donator!);
            }
            else
            {
            Donator[playerid]==1)
            SendClientMessage(playerid,COLOR_RED,"You have made this player a donator!);
            }
        return 1;
    }


Untested, but try that.
Reply
#3

Quote:
Originally Posted by Scarface~
Посмотреть сообщение
Код:
if (strcmp("/makevip", cmdtext, true, 10) == 0)
    {
        IsPlayerAdmin(playerid);
        {
            if(Donator[playerid]==1)
            SendClientMessage(playerid,COLOR_RED,"This person is already a donator!);
            }
            else
            {
            Donator[playerid]==1)
            SendClientMessage(playerid,COLOR_RED,"You have made this player a donator!);
            }
        return 1;
    }


Untested, but try that.
3 errors
Reply
#4

pawn Код:
command(makedonator, playerid, params[])
{
    new id;
    if( sscanf( params, "u", id) )
    {
        if (IsPlayerAdmin(playerid))
        {
            SendClientMessage( playerid, COLOR_WHITE, "SYNTAX: /makeadonator [id]" );
        }
    }
    else
    {
        if (IsPlayerAdmin(playerid))
        {
            if(IsPlayerConnected(id))
            {
                Donator[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "ERROR: Player isn't connected");
            }
        }
    }
    return 1;
}
Make sure you have ZCMD, and SSCANF plugin
Reply
#5

Quote:
Originally Posted by playbox12
Посмотреть сообщение
pawn Код:
command(makedonator, playerid, params[])
{
    new id;
    if( sscanf( params, "u", id) )
    {
        if (IsPlayerAdmin(playerid))
        {
            SendClientMessage( playerid, COLOR_WHITE, "SYNTAX: /makeadonator [id]" );
        }
    }
    else
    {
        if (IsPlayerAdmin(playerid))
        {
            if(IsPlayerConnected(id))
            {
                Donator[playerid] = 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "ERROR: Player isn't connected");
            }
        }
    }
    return 1;
}
Make sure you have ZCMD, and SSCANF plugin
why not just normal? xD

but im editing yours

This forum requires that you wait 120 seconds between posts. Please try again in 12 seconds.

FUCK YOU.
Reply
#6

Why do you use "u"? I don't think you are going to make any NPCs donators, so use "r".
Reply
#7

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Why do you use "u"? I don't think you are going to make any NPCs donators, so use "r".
whats the difference between u and r ?
Reply
#8

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Why do you use "u"? I don't think you are going to make any NPCs donators, so use "r".
Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
whats the difference between u and r ?
@Sergei: My bad, I didn't even know "r" existed, thanks for clearing it up.

@Victious: 'U' is a bot or player, 'R' is a only players.
Reply
#9

Quote:
Originally Posted by playbox12
Посмотреть сообщение
@Sergei: My bad, I didn't even know "r" exicited, thanks for clearing it up.

@Victious: 'U' is a bot or player, 'R' is a only players.
thanks :P

and can you do a strcmp version of yours? i tried to convert but all i get is errors..
Reply
#10

Just download ZCMD, its faster and easier, it depends on the ammount of commands you have though, it takes a while to convert everything to ZCMD

"This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds."

That is getting annoying..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)