Team Help.
#1

Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S

Please Help?

heres Code:

pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
            return 1;
        }
        new targetid = ReturnUser(tmp);
        if(targetid != INVALID_PLAYER_ID)
        {
      SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
        }

        else if(giveplayerid == INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
        return 1;
    }
Reply
#2

Quote:
Originally Posted by ╚»★«[LSTDM
Lucifier»★«╝ ]
Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S

Please Help?

heres Code:

pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
            return 1;
        }
        new targetid = ReturnUser(tmp);
        if(targetid != INVALID_PLAYER_ID)
        {
      SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
        }

        else if(giveplayerid == INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
        return 1;
    }
wow that's a crashed pawn :P
Reply
#3

LOL It Doesnt Crash it
Reply
#4

Change
pawn Код:
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator")
To

pawn Код:
SetSpawnInfo(targetid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(targetid,WHITE,"An Admin Has Changed Your Team To: Donator")
Reply
#5

Quote:
Originally Posted by [HiC
TheKiller ]
Change
pawn Код:
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator")
To

pawn Код:
SetSpawnInfo(targetid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(targetid,WHITE,"An Admin Has Changed Your Team To: Donator")
Thanks, But isnt like supposed to kill me? lol
Reply
#6

Bump: Still Doesnt Work :/
Reply
#7

Quote:
Originally Posted by ╚»★«[LSTDM
Lucifier»★«╝ ]
Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S

Please Help?

heres Code:

pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
            return 1;
        }
        new targetid = ReturnUser(tmp);
        if(targetid != INVALID_PLAYER_ID)
        {
      SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
        }

        else if(giveplayerid == INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
        return 1;
    }
Try this
pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
            return 1;
        }
        new targetid = ReturnUser(tmp);
        if(targetid == INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
      SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
      SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)