SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 30/03/2010, 02:41 PM   #1
Justsmile
Huge Clucker
 
Join Date: Dec 2008
Posts: 211
Reputation: 0
Default ReturnUser fail.

Hey, it dont work. Nothing shows up.
pawn Code:
if (strcmp("/aclear", cmdtext, true) == 0)
    {
        if(IsPlayerConnected(playerid))
      {
            if(PlayerInfo[playerid][pAdmin] >= 1336)
        {
          tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                  SendClientMessage(playerid, COLOR_GREY, "BENUTZUNG: /aclear [playerid/PartOfName]");
                  return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                  if(giveplayerid != INVALID_PLAYER_ID)
                  {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "Admin %s hat deine Wanteds gelöscht.", sendername);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    format(string, sizeof(string), "Du hast %s Wanteds gelöscht.", giveplayer);
                        SendClientMessage(playerid, COLOR_ORANGE, string);
            WantedPoints[giveplayerid] = 0;
                        WantedLevel[giveplayerid] = 0;
                        ClearCrime(giveplayerid);
                    }
                    else
                    {
                      SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht Online!");
                      return 1;
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
                return 1;
            }
        }//not connected
    }
Justsmile is offline  
Old 01/04/2010, 03:33 PM   #2
Sc4uT
Little Clucker
 
Join Date: Feb 2010
Posts: 2
Reputation: 0
Default Re: ReturnUser fail.

Every Command, we make, don't workt. We can copy it from older commands but it doesn't work, too. We think mistake is in ReturnUser, because if we only enter /aclear, the Message"BENUTZUNG: /aclear [playerid/PartOfName]" came, but we have the normal utils.inc. So pls help us.
Sc4uT is offline  
Old 01/04/2010, 03:52 PM   #3
Last_Stand_Guardian
Big Clucker
 
Join Date: Mar 2010
Posts: 126
Reputation: 0
Default Re: ReturnUser fail.

Quote:
Originally Posted by #.'
pawn Code:
if(strcmp(cmd, "/aclear", true) == 0) <---//Mistake / Fehler! :O
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 1336)
           {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                     SendClientMessage(playerid, COLOR_GREY, "BENUTZUNG: /aclear [playerid/PartOfName]");
                     return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                     if(giveplayerid != INVALID_PLAYER_ID)
                     {
                           GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                           GetPlayerName(playerid, sendername, sizeof(sendername));
                           format(string, sizeof(string), "Admin %s hat deine Wanteds gelöscht.", sendername);
                           SendClientMessage(playerid, COLOR_LIGHTRED, string);
                           format(string, sizeof(string), "Du hast %s Wanteds gelöscht.", giveplayer);
                           SendClientMessage(playerid, COLOR_ORANGE, string);
                           WantedPoints[giveplayerid] = 0;
                           WantedLevel[giveplayerid] = 0;
                           ClearCrime(giveplayerid);
                      }
                      else
                      {
                           SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht Online!");
                           return 1;
                      }
                  }
              }
              else
              {
                  SendClientMessage(playerid, COLOR_GREY, "Du bist kein Admin!");
                  return 1;
              }
     }//not connected
}
Last_Stand_Guardian is offline  
Old 01/04/2010, 04:36 PM   #4
Sc4uT
Little Clucker
 
Join Date: Feb 2010
Posts: 2
Reputation: 0
Default Re: ReturnUser fail.

Thank you very much.
Sc4uT is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ReturnUser Antonio [G-RP] Help Archive 2 20/04/2010 01:28 AM
ReturnUser and IsNumeric TheNuttyScientist Help Archive 2 28/12/2009 01:20 PM
error ReturnUser Typhome Help Archive 1 22/08/2009 04:29 AM
ReturnUser Martin_Smith Help Archive 1 20/02/2009 08:35 PM


All times are GMT. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.