armor storing on gui - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: armor storing on gui (
/showthread.php?tid=274814)
armor storing on gui -
jaksimaksi - 07.08.2011
pawn Код:
if(dialogid == 15)
{
if(response)
{
new plyName[MAX_PLAYER_NAME];
new bouse = PlayerInfo[playerid][pHouseKey];
GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
new Float:plyArmour;
GetPlayerArmour(playerid, plyArmour);
new amount = strval(inputtext);
SetPlayerArmour(playerid, -sarvaipadeti);
Houses[bouse][Armour]=Houses[bouse][Armour]+amount;
new string[126];
format(string, sizeof(string), "stored %s", amount);
SendClientMessage(playerid, 0xAFAFAFAA, string);
}
return 1;
}
Okay i'm trying to put armour with gui.. But server are not detecting what did i write in gui.. I mean i write 50, server says 2.. Somthing is wrong with detection.. Poor english sorry..
Re: armor storing on gui -
emokidx - 07.08.2011
pawn Код:
new float: total;
GetPlayerArmour(playerid, total);
SetPlayerArmour(playerid, (total - w/e amoount));
i think..
AW: armor storing on gui -
jaksimaksi - 07.08.2011
nope
Re: armor storing on gui -
MadeMan - 07.08.2011
pawn Код:
if(dialogid == 15)
{
if(response)
{
new plyName[MAX_PLAYER_NAME];
new bouse = PlayerInfo[playerid][pHouseKey];
GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
new Float:plyArmour;
GetPlayerArmour(playerid, plyArmour);
new amount = strval(inputtext);
SetPlayerArmour(playerid, plyArmour-amount);
Houses[bouse][Armour] += amount;
new string[126];
format(string, sizeof(string), "stored %d", amount);
SendClientMessage(playerid, 0xAFAFAFAA, string);
}
return 1;
}