CMD:lotto(playerid, params[])
{
new dir;
if (!strlen(dir))
{
SendClientMessage(playerid, COLOR_RED, "USAGE: /lotto ");
return 1;
}
new number = strval(dir);
new interior = GetPlayerInterior(playerid);
if (interior == 17 || interior == 6 || interior == 18 || interior == 16 || interior == 6 || interior == 4)
{
if (LottoParticipant == 1)
{
SendClientMessage(playerid, COLOR_RED, "You have already guessed a number for today.");
}
else
{
if (GetPlayerMoney(playerid) >= LOTTO_PRICE)
{
if (number > 0 && number < 100)
{
if (NumberUsed == 0)
{
new string;
format(string, sizeof(string), "~w~Your lotto number is:~g~ %d ~w~.", number);
GameTextForPlayer(playerid, string, 4000, 3);
PlayerLottoGuess = number;
LottoParticipant = 1;
GivePlayerMoney(playerid, -LOTTO_PRICE);
}
else
{
SendClientMessage(playerid, COLOR_RED, "The number you selected is already used.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "The number you entered is invalid, please type a number between 0 and 99.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have enought money to buy a lotto ticket.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You can buy lotto tickets only in 24/7 shops.");
}
return 1;
}
Detaljan opis problema: Nedaje mi nikakve erore ali kad odem ingame i kucam /lotto ispisuje mi samo tekst a ne radi nikakvu funkciju do cemu je problem ??
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
