SA-MP Forums Archive
Help xD - 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 xD (/showthread.php?tid=140219)



Help xD - ScottCFR - 08.04.2010

Ok, So i figured out a temporary solution for my class problems, If you've read my posts you'll know what i'm talking about. But i keep getting errors.

pawn Код:
new DrugLordSpawn[1][128] = {
"[HPS]HellBeast"
};
pawn Код:
39  if(classid == 286)
40  {
41      if(strcmp(Name, DrugLordSpawn, false) == 0)
42      {
43          return 1;
44      }
45      else
46      {
47        GameTextForPlayer(playerid, "~R~You do not have permissions to use this class!", 5000, 5);
48      return 0;
49      }
50  }
Код:
(41) : error 048: array dimensions do not match



Re: Help xD - smeti - 08.04.2010

pawn Код:
new DrugLordSpawn[][] = {
"[HPS]HellBeast",
"HellBeast",
"HeLLbEast",
"hellBeast",
"teszt"
};
pawn Код:
// === teszt Name
  new
        Name[24] = "HellBeast";
// ===
    for(new i; i < sizeof DrugLordSpawn; i++)
    {
        if(strcmp(Name, DrugLordSpawn[i], false) == 0)
        {
          print("enabled"); // Consol message
        } else {
          print("disabled"); // Consol message
//        GameTextForPlayer(playerid, "~R~You do not have permissions to use this class!", 5000, 5);
//        return 0;
        }
    }