SA-MP Forums Archive
Ticket & Pay Help Please :) - 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: Ticket & Pay Help Please :) (/showthread.php?tid=109778)



Ticket & Pay Help Please :) - stevestelford - 22.11.2009

Hey guys, i created some varibles
new fined500[MAX_PLAYERS];
new fined1000[MAX_PLAYERS];
new fined2000[MAX_PLAYERS];

depending on wanted level player gets fined 500 lowest 2000 highest. im trying to make a command /pay. If a player gets fined500 its works ok when typing /pay but if player types /pay and they have been fined 1000 or 2000 it says you ave not been fined recently.
Im A scripting n00b but learning heres the command , am i doing it wrong using else ifs ? Thanks For Looking Guys


if(strcmp(cmd, "/pay") == 0) {
if(IsSpawned[playerid] == 0) {
SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
return 1;
}
if(Jailed[playerid] == 1) {
SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
return 1;
}

if(fined500[playerid] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Not Been Fined Recently");
}
else if(fined1000[playerid] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Not Been Fined Recently");
}
else if(fined2000[playerid] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Not Been Fined Recently");

return 1;
}

if(fined500[playerid] == 1)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Payed Your Ticket Of $500");
fined500[playerid] =0;
return 1;
}
if(fined1000[playerid] == 1)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Payed Your Ticket Of $1000");
fined1000[playerid] =1;
return 1;
}
if(fined2000[playerid] == 1)
{
SendClientMessage(playerid, COLOR_ERROR, "You Have Payed Your Ticket Of $2000");
fined2000[playerid] =0;
return 1;
}

return 1;
}


Re: Ticket & Pay Help Please :) - br0adyb0ii - 08.04.2010

does this put a warrent out for you if you do not pay


Re: Ticket & Pay Help Please :) - Steven82 - 08.04.2010

Quote:
Originally Posted by br0adyb0ii
does this put a warrent out for you if you do not pay
It should be like wanted level 4