28.04.2013, 10:15
Hi, i have a problem. I mean, how i can add function which add 1 level per payday?
This is my payday function:
pInfo:
This is my payday function:
pawn Код:
forward payday(playerid);
public payday(playerid)
{
new hh, mm, ss;
gettime( hh, mm, ss );
if( mm == 0 )
{
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
new string[128];
new RandomPay = random(1000 - 400) + 100;
server_GiveCash( playerid, RandomPay );
SendClientMessage(playerid, COLOR_WHITE,"----PAYCHECK----");
format(string, sizeof(string), "Your earnings: $%i", RandomPay);
SendClientMessage(i, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
}
}
return 1;
}
pawn Код:
enum pInfo
{
pPass,
pCash,
pSkin,
pLevel,
pInt,
pVW,
pAdmin,
pSecKey,
pKills,
pDeaths,
Float:pFacingAngle,
Float:pHealth,
Float:pArmour,
Float:pLastX,
Float:pLastY,
Float:pLastZ
}