- 0
Problema casa
-
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
marius11
Problema intalnita (descriere):De ceva timp nu mai merge comanda /hwithdraw totul sa intamplat dintro data cand dau /hwithdraw money 5000 nu zice nimic nu stiu ce are poate din cauza ca am bagat noi case pe sv nu stiu ce are
Ero(area / rile) / warning-(ul / urile):
CMD:hwithdraw(playerid, params[]) {
new
houseID = getPlayerHouseID(playerid); // So we don't have to loop every single time... It's worth the 4 bytes!
if(getPlayerHouseID(playerid) >= 1) {
if(GetPlayerVirtualWorld(playerid) == HOUSE_VIRTUAL_WORLD+houseID) {
new
amount,
houseOperation[72]; // For formatting afterwards.
if(sscanf(params, "s[32]d", houseOperation, amount))
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/hwithdraw [mone] [amount]");
if(!strcmp(houseOperation, "500000", true)) {
if(houseVariables[houseID][hMoney] >= amount) {
if(amount >= 1 && amount < 60000000) {
houseVariables[houseID][hMoney] -= 50000;
playerVariables[playerid][pMoney] +=50000;
if(houseVariables[houseID][hMoney] < 1)
houseVariables[houseID][hMoney] = 0;
if(playerVariables[playerid][pMoney] < 1)
playerVariables[playerid][pMoney] = 0;
format(houseOperation, sizeof(houseOperation), "You have withdrawn $%d from your safe.", amount);
SendClientMessage(playerid, COLOR_WHITE, houseOperation);
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(houseOperation, sizeof(houseOperation), "* %s withdraws $%d from their safe.", szPlayerName, amount);
nearByMessage(playerid, COLOR_PURPLE, houseOperation);
}
else {
SendClientMessage(playerid, COLOR_GREY, "You can't withdraw a negative amount from a house safe. (01x03)");
printf("[error] 01x03, %d", playerid);
}
}
}
else {
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/hwithdraw [money/materials] [amount]");
}
}
}
else {
return SendClientMessage(playerid, COLOR_GREY, "You're not inside your house.");
}
return 1;
}
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Am incercat sa bag din nou comanda de pe gm de la care am inceput sa editez la gm , am rebagat comanda si tot nu merge
4 answers to this question
Recommended Posts