SA-MP Forums Archive
[[[[[[]]]]]] This 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: [[[[[[]]]]]] This doesnt work? (/showthread.php?tid=96956)



[[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 11.09.2009

Hey, why this doesnt work?
pawn Код:
if(strcmp(cmd, "/giveweaponlicense", true) == 0 || strcmp(cmd, "/gwl", true) == 0)
    {
      giveplayerid = ReturnUser(tmp);
      if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(giveplayerid,x,y,z);
                    if(PlayerInfo[playerid][pRank] < 2)
                    {
                    SendClientMessage(playerid, COLOR_GRAD1, " You need to be Rank 2 to give license!");
                      return 1;
                    }
            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 are not Cop!");
              return 1;
            }
        }
        return 1;
    }



Re: [[[[[[]]]]]] This doesnt work? - Correlli - 11.09.2009

Quote:
Originally Posted by ДitisOnHuora
Hey, why this doesnt work?
What EXACTLY doesn't work?


Re: [[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 11.09.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by ДitisOnHuora
Hey, why this doesnt work?
What EXACTLY doesn't work?
Nothing. Nothing happens.


Re: [[[[[[]]]]]] This doesnt work? - 1Fisher1 - 11.09.2009

How does the system work I assume it is saved as a variable in account file? ^^


Re: [[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 11.09.2009

Quote:
Originally Posted by 1Fisher1
How does the system work I assume it is saved as a variable in account file? ^^
PlayerInfo[giveplayerid][pGunLic] = 1;

Yes... Why?


Re: [[[[[[]]]]]] This doesnt work? - 1Fisher1 - 12.09.2009

Okay check a players user file and see if the License Variable has actually been changed and tell me what too


Re: [[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 12.09.2009

Quote:
Originally Posted by 1Fisher1
Okay check a players user file and see if the License Variable has actually been changed and tell me what too
It is not...


Re: [[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 12.09.2009

Is here really that bad scripters that cant figoure this out? D
JK

But anyone please?


Re: [[[[[[]]]]]] This doesnt work? - Correlli - 12.09.2009

Stop double-posting and help yourself with debug messages like:
pawn Код:
printf("DEBUG: debugMsg0 passed.");



Re: [[[[[[]]]]]] This doesnt work? - ДitisOnHuora - 12.09.2009

Quote:
Originally Posted by Don Correlli
Stop double-posting and help yourself with debug messages like:
pawn Код:
printf("DEBUG: debugMsg0 passed.");
I dont know how to debug?

Please can you debug this for me, so i can see example