little prblem - 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: little prblem (
/showthread.php?tid=277591)
little prblem -
Tanush123 - 18.08.2011
pawn Код:
CMD:licenses(playerid,params[])
{
new GunLic[30];
switch (PlayerData[playerid][GunLicense])
{
case 0: format(GunLic,30, "Not Passed");
case 1: format(GunLic,30, "Passed");
}
format(str,sizeof(str),"Gun License: %s",GunLic);
SendClientMessage(playerid,orange,str);
return 1;
}
when i do /licenses while i dont have gun license it shows Not Passed. When i buy a gun license and do /licenses it shows "Gun License: ", how can i make it show passed when i buy one?
Re: little prblem -
Norck - 18.08.2011
pawn Код:
CMD:licenses(playerid,params[])
{
new GunLic[30];
switch (PlayerData[playerid][GunLicense])
{
case 0: format(GunLic,30, "Not Passed");
default: format(GunLic,30, "Passed"); // I've edited this line
}
format(str,sizeof(str),"Gun License: %s",GunLic);
SendClientMessage(playerid,orange,str);
return 1;
}