SA-MP Forums Archive
command to make someone donator? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: command to make someone donator? (/showthread.php?tid=174146)



command to make someone donator? - WillyP - 04.09.2010

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?


Re: command to make someone donator? - Scarface~ - 04.09.2010

Код:
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.


Re: command to make someone donator? - WillyP - 04.09.2010

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


Re: command to make someone donator? - playbox12 - 04.09.2010

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


Re: command to make someone donator? - WillyP - 04.09.2010

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.


Re: command to make someone donator? - Sergei - 04.09.2010

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


Re: command to make someone donator? - WillyP - 04.09.2010

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 ?


Re: command to make someone donator? - playbox12 - 04.09.2010

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.


Re: command to make someone donator? - WillyP - 04.09.2010

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


Re: command to make someone donator? - playbox12 - 04.09.2010

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