SA-MP Forums Archive
need a bit help - 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)
+--- Thread: need a bit help (/showthread.php?tid=401827)



need a bit help - mineralo - 24.12.2012

well, I made every job has own gun weapon available to take only that job, but when somebody pickup it he too get weapon + message that isn't his job gun
what's wrong?
pawn Код:
for(new i=0;i<MAX_JOBS;i++)
    {
        if(pickupid == JobIcons[i])
        {
            if(i != GetPlayerJobID(playerid))
            {
                scm(playerid,c_r,"( ! ) This weapon icon isn't for your job !");
                return 1;
            }
            new gun = GetWeaponIDFromIconID(JobsIcons[i][iModel]);
            if(gun == -1)
            {
                SetPlayerArmour(playerid,100.0);
            }
            else
            {
                GivePlayerWeapon(playerid,gun,1);
            }
            scm(playerid,COLOR_GREEN,"( ! ) You receive weapon of job !");
            return 1;
        }
    }