- 0
[Ajutor] Cum pot face sa dau /withdraw la coordonate
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
calin1996
[pawn]if(strcmp(cmd, "/withdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] == 103 || PlayerInfo[playerid][pLocal] == 102 || PlayerInfo[playerid][pLocal] == 117)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /withdraw [suma]");
format(string, sizeof(string), " Ai %d RON In contul tau.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /withdraw [suma]");
format(string, sizeof(string), " Ai %d RON in contul tau.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Nu ai asa de mult !");
return 1;
}
//ConsumingMoney[playerid] = 1;
SafeGivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Ai scos suma de %d RON din contul tau. Total Cont: %d RON ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nu esti la banca !");
return 1;
}
}
return 1;
}[/pawn]
Creez obiectul ATM,Iar cumva aici daca imi puteti da un ex.,la coordonatele alea cand cineva fol. /withdraw sa functioneze ca la banca!
NU MAI TREBUIE AM REUSIT DATORITA SAMPWIKI.COM
In loc de [pawn]if(PlayerInfo[playerid][pLocal] == 103 || PlayerInfo[playerid][pLocal] == 102 || PlayerInfo[playerid][pLocal] == 117)[/pawn] am pus [pawn]if(IsPlayerInRangeOfPoint(playerid, 3.0, 632.4916,-492.3098,16.3359))[/pawn] .Asta am scris pentru cei care nu stiu,sa nu mai faca posturi
0 answers to this question
Recommended Posts