Donator
#1

Hey, can someone make a command where rcon admin types /makedonator then the player is Donator == 1;
Reply
#2

One thread is enough.
Reply
#3

Help would be nice...
Reply
#4

Haven't done anything with strcmp for a while, but here's my go at it.

pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) {
    new newDonator;
    tmp = strtok(cmdtext, idx);
    newDonator = ReturnUser(tmp);
    if(IsPlayerConnected(newDonator))
    {
        if(IsPlayerAdmin(playerid))
        {
            Donator[newDonator] = 1;
        }
        else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
    }
    return 1;
}
EDITED - Added the part where you have to be an Administrator.
Reply
#5

Quote:
Originally Posted by Sky4D
View Post
Haven't done anything with strcmp for a while, but here's my go at it.

pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) {
    new newDonator;
    tmp = strtok(cmdtext, idx);
    newDonator = ReturnUser(tmp);
    if(IsPlayerConnected(newDonator))
    {
        if(IsPlayerAdmin(playerid))
        {
            Donator[newDonator] = 1;
        }
        else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
    }
    return 1;
}
EDITED - Added the part where you have to be an Administrator.
thanks :P p.s: i work with dcmd, but it was easy to convert
Reply
#6

Quote:
Originally Posted by Vince
View Post
Next time, don't make several threads to get your shit done .. wait 12 hours then just spam your old thread.
Reply
#7

Quote:
Originally Posted by thomas..
View Post
thanks :P p.s: i work with dcmd, but it was easy to convert
Do you use SSCANF too? It could have saved me alot of effort if you do.. lol.

In the future, please state in your post which command processor you use.
Reply
#8

Quote:
Originally Posted by Sky4D
View Post
Haven't done anything with strcmp for a while, but here's my go at it.

pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) {
    new newDonator;
    tmp = strtok(cmdtext, idx);
    newDonator = ReturnUser(tmp);
    if(IsPlayerConnected(newDonator))
    {
        if(IsPlayerAdmin(playerid))
        {
            Donator[newDonator] = 1;
        }
        else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
    }
    return 1;
}
EDITED - Added the part where you have to be an Administrator.
gives errors...

anyway, that was 2 days ago.. dont see why i got a infraction, cause to me 12hrs < 2days...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)