SA-MP Forums Archive
[HELP] Why this command doesnt work? - 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: [HELP] Why this command doesnt work? (/showthread.php?tid=91124)



[HELP] Why this command doesnt work? - Spatman - 12.08.2009

pawn Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
    {
      giveplayerid = ReturnUser(tmp);
      if(IsPlayerConnected(giveplayerid))
        {
        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
            {
                if(PlayerInfo[playerid][pRank] < 2)
                {
              if(giveplayerid != INVALID_PLAYER_ID)
                    {
                new Float:x, Float:y, Float:z;
                GetPlayerPos(giveplayerid,x,y,z);
                if(!PlayerToPoint(15, playerid, x, y, z))
                        {
                  SendClientMessage(playerid, COLOR_GRAD1, " Player is not near you!");
                  return 1;
                }
                if(PlayerInfo[giveplayerid][pGunLic] == 1)
                        {
                  SendClientMessage(playerid, COLOR_GRAD1, " Player already haves weapon license.");
                  return 1;
                }
                PlayerInfo[giveplayerid][pGunLic] = 1;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* Officer %s gave you Weapons License.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "* You gave Weapons License to %s.",giveplayerid);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
              }
                }
                else
                {
                  SendClientMessage(playerid, COLOR_GRAD1, " You need to be Rank 2 to give license!");
                  return 1;
                }
            }
            else
            {
              SendClientMessage(playerid, COLOR_GRAD1, " You are not Cop!");
              return 1;
            }
        }
        return 1;
    }
When i type /gwl nothing happens, why?


Re: [HELP] Why this command doesnt work? - wilcock33 - 12.08.2009

Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
try this instead

Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 1 || strcmp(cmd, "/gwl", true) == 1)
if it dont work then i dont know XD


Re: [HELP] Why this command doesnt work? - Spatman - 12.08.2009

Quote:
Originally Posted by TFZ
Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
try this instead

Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 1 || strcmp(cmd, "/gwl", true) == 1)
if it dont work then i dont know XD
I never saw someone used that way? Is it even worth to try? -.-


Re: [HELP] Why this command doesnt work? - _Vortex - 12.08.2009

Quote:
Originally Posted by Spatman
Quote:
Originally Posted by TFZ
Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
try this instead

Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 1 || strcmp(cmd, "/gwl", true) == 1)
if it dont work then i dont know XD
I never saw someone used that way? Is it even worth to try? -.-
Duh?


Re: [HELP] Why this command doesnt work? - Spatman - 12.08.2009

Quote:
Originally Posted by Zer0[x
]
Quote:
Originally Posted by Spatman
Quote:
Originally Posted by TFZ
Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
try this instead

Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 1 || strcmp(cmd, "/gwl", true) == 1)
if it dont work then i dont know XD
I never saw someone used that way? Is it even worth to try? -.-
Duh?
Duh, its not working.


Re: [HELP] Why this command doesnt work? - _Vortex - 12.08.2009

he never said it would work.


Re: [HELP] Why this command doesnt work? - Spatman - 12.08.2009

Anyone having a solution for this?


Re: [HELP] Why this command doesnt work? - Shots - 12.08.2009

Quote:
Originally Posted by Spatman
[pawn] if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
if (strcmp(cmdtext, "/giveweaponlicense", true) == 0 || strcmp(cmdtext, "/gwl", true) == 0)


Let me know if it works.


Re: [HELP] Why this command doesnt work? - HuRRiCaNe - 13.08.2009

if(strcmp(cmd, "/giveweaponlicense",true) == 0 || strcmp(cmd, "/gwl", true) == 0) /
this is ok but are u sure the /giveweaponlicense works?


Re: [HELP] Why this command doesnt work? - Spatman - 13.08.2009

Quote:
Originally Posted by BiG_Sm0k3
if(strcmp(cmd, "/giveweaponlicense",true) == 0 || strcmp(cmd, "/gwl", true) == 0) /
this is ok but are u sure the /giveweaponlicense works?
What do you mean?

Just nothing happnes when i use the command.