forward ResetBizCash(playerid);
new BizCash[MAX_PLAYERS];
OnPlayerCommandText
if(strcmp(cmd, "/bizmoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pBizOwn] < 1)
{
if(BizCash[playerid] == 0)
{
GivePlayerMoney(playerid, 500000);
SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
}
if(BizCash[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
}
}
}
return 1;
}
public ResetBizCash(playerid)
{
BizCash[playerid] == 0;
}
public ResetBizCash(playerid)
{
BizCash[playerid] = 0;
}
|
Originally Posted by Trafikk
The rest of the script it's ok? or I have to change there something
|
|
Originally Posted by Trafikk
The rest of the script it's ok? or I have to change there something
|
Does somebody know how to make a command that if a Biz owner types /bizmoney or something he get the amount of money defined and can use that command only after 1 day.
if(strcmp(cmd, "/bizmoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pBizOwn] < 1)
{
if(BizCash[playerid] == 0)
{
GivePlayerMoney(playerid, 500000);
SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
BizCash[playerid] == 1;
}
if(BizCash[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
BizCash[playerid] == 0;
}
}
}
return 1;
}
if(strcmp(cmd, "/bizmoney", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pBizOwn] < 1)
{
if(BizCash[playerid] = 0)
{
GivePlayerMoney(playerid, 500000);
SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
BizCash[playerid] = 1;
}
if(BizCash[playerid] = 1)
{
SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
BizCash[playerid] = 0;
}
}
}
return 1;
}