24.07.2015, 17:25
Hello. I have a big problem of payday Systeme simply does not want to go and I put the older versions of gamemode did not want me and all I did command / figure payday when he says, "SERVER: Unknown command" if there were no such treburii look like this:
PHP код:
SendClientMessage return (playerid, COLOR_SERVER, "Error: {FFFFFF} This command does not exist.");
PHP код:
public PayDay()
{
new
string[512],
account,
interest,
rent;
new hour,minute,second, year, month, day;
gettime(hour,minute,second);
getdate(year, month, day);
if(minute == 00 && second == 00 || CPayDay == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gPlayerLogged[i] == 1)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
new tmpintrate;
new key = PlayerInfo[i][pPhouseKey];
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0) {
if(PlayerInfo[i][pPremium] > 0) { tmpintrate = intrate+9; }
else { tmpintrate = intrate+6; }
}
else {
if(PlayerInfo[i][pPremium] > 0) { tmpintrate = 6; }
else { tmpintrate = 4; }
}
CPayDay = 0;
Tax += TaxValue;
PlayerInfo[i][pAccount] -= TaxValue;
new checks = PlayerInfo[i][pLevel]*35000;
ConsumingMoney[i] = 1;
GivePlayerCash(i, checks);
PlayerInfo[i][pCash] += checks;
if(PlayerInfo[i][pGiftPoints] < 5) { PlayerInfo[i][pGiftPoints] ++; }
interest = (PlayerInfo[i][pAccount]/200)*(tmpintrate);
PlayerInfo[i][pExp]++;
account = PlayerInfo[i][pAccount];
PlayerInfo[i][pAccount] = account+interest;
PlayerInfo[i][pRob] += 1;
GameTextForPlayer(i, "~g~payday", 5000, 1);
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pBlackList] --;
PlayerInfo[i][pHoursPlayed] ++;
if(PlayerInfo[i][pBlackList] <= 0) { PlayerInfo[i][pBlackList] = 0; }
SendClientMessage(i, COLOR_TEAL, "------------------------ {09FF00}PayDay{49809E} ------------------------");
format(string, 256, "• Salariu: {F0021A}$%s", FormatNumber(checks));
SCM(i, COLOR_YELLOW, string);
format(string, 256, "• Taxe: {F0021A}$%s", FormatNumber(TaxValue));
SCM(i, COLOR_YELLOW, string);
format(string, 256, "• Dobanda: {F0021A}$%s ", FormatNumber(tmpintrate));
SCM(i, COLOR_YELLOW, string);
format(string, 256, "• Dobanda acumulata: {F0021A}$%s ", FormatNumber(interest));
SCM(i, COLOR_YELLOW, string);
format(string, 256, "• Balanta noua: {F0021A}$%s ", FormatNumber(PlayerInfo[i][pAccount]));
SCM(i, COLOR_YELLOW, string);
if(key != 255) {
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0) {
rent = 0;
}
else if(rent > GetPlayerMoney(i)) {
PlayerInfo[i][pPhouseKey] = 255;
SendClientMessage(i, COLOR_WHITE, "* Ai fost evacuat din casa!");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new bonusmoney;
if(PlayerInfo[i][pPremium] >= 1) {
bonusmoney = PlayerInfo[i][pLevel] * 50000;
format(string, 256, "• Bonus Premium: {F0021A}$%s", FormatNumber(bonusmoney));
SCM(i, COLOR_YELLOW, string);
GivePlayerCash(i, bonusmoney);
PlayerInfo[i][pCash] += bonusmoney;
}
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2) {
if(PlayerInfo[i][pFreePoints] == 10) { SCM(i, -1, "Nu ai primit Free Point deoarece ai numarul maxim de Free Points (10)."); PlayerInfo[i][pFreePoints] = 10; }
PlayerInfo[i][pFreePoints] += 1;
}
if(PlayerInfo[i][pGiftPoints] == 5) { SCM(i, COLOR_YELLOW, "* Acum poti folosi din nou comanda [/getgift]!"); }
SendClientMessage(i, COLOR_TEAL, "--------------------------------------------------------------");
}
}
}
return 1;
}
if(strcmp(cmd, "/payday", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
CPayDay = 1;
PayDay();
}
else
{
SCM(playerid, COLOR_LGREEN, "Nu esti autorizat sa folosesti aceasta comanda!");
return 1;
}
return 1;
}