- 0
Nu se executa comanda atunci cand o dau
-
Similar Content
-
- 2 replies
- 2.004 views
-
Am o problema cu un special quest de iarna,sunt la inceput cu scripting-ul si am o problema,cand intru in raza de checkpoint nu se intampla absolut nimic,stie cineva de ce?
By cbnmihaita,
- 3 answers
- 1.027 views
-
- 1 answer
- 449 views
-
- 2 answers
- 1.044 views
-
Am o problema cu un battlepass,de ce nu merge comanda /misiuni cand o scriu,tin sa precizez ca script-ul mi l-a facut chatgpt
By cbnmihaita,
- 2 answers
- 859 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.

Question
Shad0wdpbgd
Salut, de data asta, am o problema mai ciudata, care nu am mai intalnit o pana acum.
Adica cand dau comanda prima data nu merge, dar daca o spamez de multe ori pana la urma merge.
Aceasta este comanda:
CMD:trylucky(playerid, params[])
{
new amount, string[64], rand = random(50);
if(!PlayerToPoint(2.0, playerid, 386.7224,-1817.7662,7.8409))
{
SetPlayerCheckpointEx(playerid, 386.7224,-1817.7662,7.8409, 5.0);
CP[playerid] = 678;
SCM(playerid, COLOR_GREY, "You are not at the right place.");
SCM(playerid, COLOR_YELLOW, "Ti-am pus un checkpoint catre locatie, du-te la el!");
return 1;
}
if(sscanf(params, "i", amount)) return SCM(playerid, -1, "{CECECE}USAGE: {FFFFFF}/trylucky <amount>");
if(amount < 10000) return SCM(playerid, COLOR_GREY, "Suma trebuie sa fie de minim $10.000.");
if(GetPlayerCash(playerid) < amount) return SCM(playerid, -1, "Nu ai aceasta suma de bani.");
switch(rand) {
Edited by Raduqcase 0:
{
format(string, sizeof(string), "You lost $%s.", FormatNumber(amount));
SCM(playerid, COLOR_GREEN, string);
GivePlayerCash(playerid, -amount);
Update(playerid, pCashx);
}
case 1:
{
format(string, sizeof(string), "Congratulations, %s! You won $%s.", GetName(playerid), FormatNumber(amount+amount));
SCM(playerid, COLOR_GREEN, string);
GivePlayerCash(playerid, amount+amount);
Update(playerid, pCashx);
}
}
return 1;
}
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now