Ticket & Pay Help Please :)
#1

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;
}
Reply
#2

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)