- 0
Ajutor comenzi /fwithdraw & /fdeposit
-
Similar Content
-
- 3 replies
- 128 views
-
- 0 replies
- 92 views
-
- 4 replies
- 168 views
-
- 5 replies
- 375 views
-
- 1 reply
- 247 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
diablo16
Va rog sa ma ajutati la aceste 2 comenzi : la /fdeposit imi arata ca-mi ia banii se adauga in contul familiei dar banii revin la mine in mana iar la /fwithdraw imi arata ca iau banii din contul familiei dar nu-mi da banii.
Poze cu problema /fdeposit :
>>>SS 1:
>>>SS 2: [img width=500 height=375]http://desmond.imageshack.us/Himg84/scaled.php?server=84&filename=samp057qz.png&res=landing
Poze cu problema /fwithdraw
>>>SS 1: [img width=500 height=375]http://desmond.imageshack.us/Himg801/scaled.php?server=801&filename=samp058pt.png&res=landing
>>>SS 2: [img width=500 height=375]http://desmond.imageshack.us/Himg692/scaled.php?server=692&filename=samp059yw.png&res=landing
Uitati si liniile :
[pawn]if(strcmp(cmd, "/fdeposit", true) == 0)
{
if(IsAMember(playerid))
{
if (PlayerToPoint(30.0, playerid,-2159.122802,641.517517,1052.381713) || PlayerToPoint(30.0, playerid,2324.419921,-1145.568359,1050.710083) || PlayerToPoint(30.0, playerid,1277.9442,-837.3730,1085.6328) || PlayerToPoint(30.0, playerid,1710.433715,-1669.379272,20.225049) || PlayerToPoint(30.0, playerid,942.171997,-16.542755,1000.929687) || PlayerToPoint(30.0, playerid,964.106994,-53.205497,1001.124572))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fdeposit [amount]");
format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fdeposit [amount]");
format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
return 1;
}
GivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccf];
PlayerInfo[playerid][pAccf]=cashdeposit+PlayerInfo[playerid][pAccf];
SendClientMessage(playerid, COLOR_WHITE, "|___ SAFE BOX ___|");
format(string, sizeof(string), " Old Balance: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), " Deposit: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------|");
format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/fwithdraw", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 16)
{
if (PlayerToPoint(30.0, playerid,-2159.122802,641.517517,1052.381713) || PlayerToPoint(30.0, playerid,2324.419921,-1145.568359,1050.710083) || PlayerToPoint(30.0, playerid,1277.9442,-837.3730,1085.6328) || PlayerToPoint(30.0, playerid,1710.433715,-1669.379272,20.225049) || PlayerToPoint(30.0, playerid,942.171997,-16.542755,1000.929687) || PlayerToPoint(30.0, playerid,964.106994,-53.205497,1001.124572))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fwithdraw [amount]");
format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fwithdraw [amount]");
format(string, sizeof(string), " You Have $%d in your hq.", PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccf] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
return 1;
}
//ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccf]=PlayerInfo[playerid][pAccf]-cashdeposit;
format(string, sizeof(string), " You Have Withdrawn $%d from your hq Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccf]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
return 1;
}[/pawn]
Link to comment
Share on other sites
0 answers to this question
Recommended Posts