payday system problem ! -
Joe Vagos - 25.01.2014
deleted
Re: payday system problem ! -
Joe Vagos - 26.01.2014
bump , help me plz
Re: payday system problem ! -
[TMS]Legena - 26.01.2014
Try to change this :
Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X,
Float:Y,
Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
{
return 1;
}
return 0;
}
in this:
Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
{
return 1;
}
return 1;
}
Re: payday system problem ! -
Joe Vagos - 26.01.2014
nothing changed :S
Respuesta: payday system problem ! -
Stront - 26.01.2014
Try to set it into integer. So, delete .00 from minute and hour.
Or also you can float the integer with:
new Float:hours, Float:minutes;
hours = float(hour);
minutes = float(minutes);
and make the same comparation as before
Or compare it with floatcmp(float, float) == 0
Re: payday system problem ! -
Joe Vagos - 26.01.2014
deleted
Re: payday system problem ! -
[TMS]Legena - 26.01.2014
hmm try to change this
Код:
forward BankTime();
public BankTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInArea(i,2085.6704,2059.4272,11.0579,92.7368))
{
new hours;
new minutes;
GetPlayerTime(i, hours, minutes);
if(hours == 6.00 && minutes == 0.00)
{
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(i, 7500);
SendClientMessage(i, 0x12900BBF, "||| 6:00 | BANK TIME: |||");
SendClientMessage(i, 0xFFFF00AA, "YOU RECEIVE +50 $");
return 1;
}
}
}
return 1;
}
to this:
Код:
forward BankTime();
public BankTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new hours,new minutes;
GetPlayerTime(i, hours, minutes);
if(hours == 6.00 && minutes == 0.00)
{
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(i, 7500);
SendClientMessage(i, 0x12900BBF, "||| 6:00 | BANK TIME: |||");
SendClientMessage(i, 0xFFFF00AA, "YOU RECEIVE +50 $");
return 1;
}
}
return 1;
}
I hope it will work now.
Re: payday system problem ! -
Joe Vagos - 26.01.2014
it doesnt work , also the IsPlayerInArea function i think it doesnt work ,cause when i open the server on its starting up it gives the msg " ( ! ) welcome to bank ! :S
Re: payday system problem ! -
[TMS]Legena - 26.01.2014
It show you message because of this:
Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0xFFFF00AA, "( ! ) Welcome to Bank!");
SetPlayerMapIcon( playerid,52,2085.6704,2059.4272,11.0579, 12,1,MAPICON_GLOBAL );
return 1;
}
But i really can't find where is problem.I think that problem is in time but I don't know. :/
Re: payday system problem ! -
Joe Vagos - 26.01.2014
thanks to u legena for ur helping , " there no function Inplayerconnect except the mapiconglobal ,
i think that i should insert a time system in that script ?! but i dunno what should i do :S