Moin,
ich habe es grade so gemacht das der Payday nach Score geht.
Public Payday
Code:
public payday(playerid)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerScore(playerid)==0)return GivePlayerMoney(playerid,500); GameTextForPlayer(playerid, "~r~+500$", 3000, 4);
if(GetPlayerScore(playerid)==10)return GivePlayerMoney(playerid,600); GameTextForPlayer(playerid, "~r~+600$", 3000, 4);
if(GetPlayerScore(playerid)==20)return GivePlayerMoney(playerid,700); GameTextForPlayer(playerid, "~r~+700$", 3000, 4);
if(GetPlayerScore(playerid)==30)return GivePlayerMoney(playerid,800); GameTextForPlayer(playerid, "~r~+800$", 3000, 4);
if(GetPlayerScore(playerid)==40)return GivePlayerMoney(playerid,900); GameTextForPlayer(playerid, "~r~+900$", 3000, 4);
if(GetPlayerScore(playerid)==50)return GivePlayerMoney(playerid,1000); GameTextForPlayer(playerid, "~r~+1000$",3000, 4);
if(GetPlayerScore(playerid)==60)return GivePlayerMoney(playerid,1100); GameTextForPlayer(playerid, "~r~+1100$",3000, 4);
if(GetPlayerScore(playerid)==70)return GivePlayerMoney(playerid,1200); GameTextForPlayer(playerid, "~r~+1200$",3000, 4);
if(GetPlayerScore(playerid)==80)return GivePlayerMoney(playerid,1300); GameTextForPlayer(playerid, "~r~+1300$",3000, 4);
if(GetPlayerScore(playerid)==90)return GivePlayerMoney(playerid,1400); GameTextForPlayer(playerid, "~r~+1400$",3000, 4);
if(GetPlayerScore(playerid)==100)return GivePlayerMoney(playerid,1500); GameTextForPlayer(playerid, "~r~+1500$",3000, 4);
if(GetPlayerScore(playerid)==110)return GivePlayerMoney(playerid,1600); GameTextForPlayer(playerid, "~r~+1600$",3000, 4);
if(GetPlayerScore(playerid)==120)return GivePlayerMoney(playerid,1700); GameTextForPlayer(playerid, "~r~+1700$",3000, 4);
if(GetPlayerScore(playerid)==130)return GivePlayerMoney(playerid,1800); GameTextForPlayer(playerid, "~r~+1800$",3000, 4);
if(GetPlayerScore(playerid)==140)return GivePlayerMoney(playerid,1900); GameTextForPlayer(playerid, "~r~+1900$",3000, 4);
if(GetPlayerScore(playerid)==150)return GivePlayerMoney(playerid,2000); GameTextForPlayer(playerid, "~r~+2000$",3000, 4);
if(GetPlayerScore(playerid)==160)return GivePlayerMoney(playerid,2100); GameTextForPlayer(playerid, "~r~+2100$",3000, 4);
if(GetPlayerScore(playerid)==170)return GivePlayerMoney(playerid,2200); GameTextForPlayer(playerid, "~r~+2200$",3000, 4);
if(GetPlayerScore(playerid)==180)return GivePlayerMoney(playerid,2300); GameTextForPlayer(playerid, "~r~+2300$",3000, 4);
if(GetPlayerScore(playerid)==190)return GivePlayerMoney(playerid,2400); GameTextForPlayer(playerid, "~r~+2400$",3000, 4);
if(GetPlayerScore(playerid)==200)return GivePlayerMoney(playerid,2500); GameTextForPlayer(playerid, "~r~+2500$",3000, 4);
if(GetPlayerScore(playerid)==210)return GivePlayerMoney(playerid,2600); GameTextForPlayer(playerid, "~r~+2600$",3000, 4);
if(GetPlayerScore(playerid)==220)return GivePlayerMoney(playerid,2700); GameTextForPlayer(playerid, "~r~+2700$",3000, 4);
if(GetPlayerScore(playerid)==230)return GivePlayerMoney(playerid,2800); GameTextForPlayer(playerid, "~r~+2800$",3000, 4);
if(GetPlayerScore(playerid)==240)return GivePlayerMoney(playerid,2900); GameTextForPlayer(playerid, "~r~+2900$",3000, 4);
if(GetPlayerScore(playerid)==250)return GivePlayerMoney(playerid,3000); GameTextForPlayer(playerid, "~r~+3000$",3000, 4);
if(GetPlayerScore(playerid)==260)return GivePlayerMoney(playerid,3100); GameTextForPlayer(playerid, "~r~+3100$",3000, 4);
if(GetPlayerScore(playerid)==270)return GivePlayerMoney(playerid,3200); GameTextForPlayer(playerid, "~r~+3200$",3000, 4);
if(GetPlayerScore(playerid)==280)return GivePlayerMoney(playerid,3300); GameTextForPlayer(playerid, "~r~+3300$",3000, 4);
if(GetPlayerScore(playerid)==290)return GivePlayerMoney(playerid,3400); GameTextForPlayer(playerid, "~r~+3400$",3000, 4);
if(GetPlayerScore(playerid)==300)return GivePlayerMoney(playerid,3500); GameTextForPlayer(playerid, "~r~+3500$",3000, 4);
}
}
return 1;
}
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerScore(playerid)==0)return GivePlayerMoney(playerid,500); GameTextForPlayer(playerid, "~r~+500$", 3000, 4);
if(GetPlayerScore(playerid)==10)return GivePlayerMoney(playerid,600); GameTextForPlayer(playerid, "~r~+600$", 3000, 4);
if(GetPlayerScore(playerid)==20)return GivePlayerMoney(playerid,700); GameTextForPlayer(playerid, "~r~+700$", 3000, 4);
if(GetPlayerScore(playerid)==30)return GivePlayerMoney(playerid,800); GameTextForPlayer(playerid, "~r~+800$", 3000, 4);
if(GetPlayerScore(playerid)==40)return GivePlayerMoney(playerid,900); GameTextForPlayer(playerid, "~r~+900$", 3000, 4);
if(GetPlayerScore(playerid)==50)return GivePlayerMoney(playerid,1000); GameTextForPlayer(playerid, "~r~+1000$",3000, 4);
if(GetPlayerScore(playerid)==60)return GivePlayerMoney(playerid,1100); GameTextForPlayer(playerid, "~r~+1100$",3000, 4);
if(GetPlayerScore(playerid)==70)return GivePlayerMoney(playerid,1200); GameTextForPlayer(playerid, "~r~+1200$",3000, 4);
if(GetPlayerScore(playerid)==80)return GivePlayerMoney(playerid,1300); GameTextForPlayer(playerid, "~r~+1300$",3000, 4);
if(GetPlayerScore(playerid)==90)return GivePlayerMoney(playerid,1400); GameTextForPlayer(playerid, "~r~+1400$",3000, 4);
if(GetPlayerScore(playerid)==100)return GivePlayerMoney(playerid,1500); GameTextForPlayer(playerid, "~r~+1500$",3000, 4);
if(GetPlayerScore(playerid)==110)return GivePlayerMoney(playerid,1600); GameTextForPlayer(playerid, "~r~+1600$",3000, 4);
if(GetPlayerScore(playerid)==120)return GivePlayerMoney(playerid,1700); GameTextForPlayer(playerid, "~r~+1700$",3000, 4);
if(GetPlayerScore(playerid)==130)return GivePlayerMoney(playerid,1800); GameTextForPlayer(playerid, "~r~+1800$",3000, 4);
if(GetPlayerScore(playerid)==140)return GivePlayerMoney(playerid,1900); GameTextForPlayer(playerid, "~r~+1900$",3000, 4);
if(GetPlayerScore(playerid)==150)return GivePlayerMoney(playerid,2000); GameTextForPlayer(playerid, "~r~+2000$",3000, 4);
if(GetPlayerScore(playerid)==160)return GivePlayerMoney(playerid,2100); GameTextForPlayer(playerid, "~r~+2100$",3000, 4);
if(GetPlayerScore(playerid)==170)return GivePlayerMoney(playerid,2200); GameTextForPlayer(playerid, "~r~+2200$",3000, 4);
if(GetPlayerScore(playerid)==180)return GivePlayerMoney(playerid,2300); GameTextForPlayer(playerid, "~r~+2300$",3000, 4);
if(GetPlayerScore(playerid)==190)return GivePlayerMoney(playerid,2400); GameTextForPlayer(playerid, "~r~+2400$",3000, 4);
if(GetPlayerScore(playerid)==200)return GivePlayerMoney(playerid,2500); GameTextForPlayer(playerid, "~r~+2500$",3000, 4);
if(GetPlayerScore(playerid)==210)return GivePlayerMoney(playerid,2600); GameTextForPlayer(playerid, "~r~+2600$",3000, 4);
if(GetPlayerScore(playerid)==220)return GivePlayerMoney(playerid,2700); GameTextForPlayer(playerid, "~r~+2700$",3000, 4);
if(GetPlayerScore(playerid)==230)return GivePlayerMoney(playerid,2800); GameTextForPlayer(playerid, "~r~+2800$",3000, 4);
if(GetPlayerScore(playerid)==240)return GivePlayerMoney(playerid,2900); GameTextForPlayer(playerid, "~r~+2900$",3000, 4);
if(GetPlayerScore(playerid)==250)return GivePlayerMoney(playerid,3000); GameTextForPlayer(playerid, "~r~+3000$",3000, 4);
if(GetPlayerScore(playerid)==260)return GivePlayerMoney(playerid,3100); GameTextForPlayer(playerid, "~r~+3100$",3000, 4);
if(GetPlayerScore(playerid)==270)return GivePlayerMoney(playerid,3200); GameTextForPlayer(playerid, "~r~+3200$",3000, 4);
if(GetPlayerScore(playerid)==280)return GivePlayerMoney(playerid,3300); GameTextForPlayer(playerid, "~r~+3300$",3000, 4);
if(GetPlayerScore(playerid)==290)return GivePlayerMoney(playerid,3400); GameTextForPlayer(playerid, "~r~+3400$",3000, 4);
if(GetPlayerScore(playerid)==300)return GivePlayerMoney(playerid,3500); GameTextForPlayer(playerid, "~r~+3500$",3000, 4);
}
}
return 1;
}
Problem daran ist, wenn ich exakt 20Score habe, bekomm ich 700$ aber die Meldung +600$.
if(GetPlayerScore(playerid)==20)return GivePlayerMoney(playerid,700); GameTextForPlayer(playerid, "~r~+700$", 3000, 4);
Weiteres Problem, wenn ich 15Score habe bekomm ich 0$ und die Meldung +3500$.
Irgendwas mit >= / =< Oder so ?
Woran liegt das ?
Danke schonmal
MfG
Ed_Hardy
Ps. Hier könnt ich vll auch etwas Hilfe gebrauchen :)
EDIT: Code etwas geändert... // Geht trotzdem nicht... // Keiner eine Lösung ?