PHP код:
CMD:diemdanh(playerid, params[])
{
new string[128];
new d, m, y;
GetDate_V(d, m, y);
if(PlayerInfo[playerid][pDiemDanh] == 0 && PlayerInfo[playerid][pNgayDiemDanh] == 3)
{
PlayerInfo[playerid][pCredits] += 100;
PlayerInfo[playerid][pDiemDanh] = 1;
PlayerInfo[playerid][pNgayDiemDanh] += 1;
PlayerInfo[playerid][pDiemDanhDate] = d;
format(string, sizeof(string), "{FFFFFF}[!] Ban da diem danh hang ngay, so ngay ban diem danh hien tai la: %d", PlayerInfo[playerid][pNgayDiemDanh]);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_YELLOW, "{FFFFFF}[?] Ban da nhan duoc 100 Credits vi lien tuc diem danh lien tiep 3 ngay!");
}
else if(PlayerInfo[playerid][pDiemDanh] == 0 && PlayerInfo[playerid][pNgayDiemDanh] == 10)
{
GivePlayerCash(playerid, 1000000);
PlayerInfo[playerid][pDiemDanh] = 1;
PlayerInfo[playerid][pNgayDiemDanh] += 1;
PlayerInfo[playerid][pDiemDanhDate] = d;
format(string, sizeof(string), "{FFFFFF}[!] Ban da diem danh hang ngay, so ngay ban diem danh hien tai la: %d", PlayerInfo[playerid][pNgayDiemDanh]);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_YELLOW, "{FFFFFF}[?] Ban da nhan duoc 1,000,000$ SAD vi lien tuc diem danh lien tiep 10 ngay!");
}
else if(PlayerInfo[playerid][pDiemDanh] == 0 && PlayerInfo[playerid][pNgayDiemDanh] == 20)
{
GivePlayerCash(playerid, 50000);
PlayerInfo[playerid][pVehVoucher] += 1;
PlayerInfo[playerid][pDiemDanh] = 1;
PlayerInfo[playerid][pNgayDiemDanh] += 1;
PlayerInfo[playerid][pDiemDanhDate] = d;
format(string, sizeof(string), "{FFFFFF}[!] Ban da diem danh hang ngay, so ngay ban diem danh hien tai la: %d", PlayerInfo[playerid][pNgayDiemDanh]);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_YELLOW, "{FFFFFF}[?] Ban da nhan duoc Car Vouchers (FreeCar) vi lien tuc diem danh lien tiep 20 ngay!");
}
else if(PlayerInfo[playerid][pDiemDanh] == 0 && PlayerInfo[playerid][pNgayDiemDanh] == 30)
{
GivePlayerCash(playerid, 50000);
PlayerInfo[playerid][pGVIPVoucher] += 1;
PlayerInfo[playerid][pDiemDanh] = 1;
PlayerInfo[playerid][pNgayDiemDanh] += 1;
PlayerInfo[playerid][pDiemDanhDate] = d;
format(string, sizeof(string), "{FFFFFF}[!] Ban da diem danh hang ngay, so ngay ban diem danh hien tai la: %d", PlayerInfo[playerid][pNgayDiemDanh]);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_YELLOW, "{FFFFFF}[?] Ban da nhan duoc VIP GOLD (30 Days) vi lien tuc diem danh lien tiep 20 ngay!");
}
else if(PlayerInfo[playerid][pDiemDanh] == 0)
{
GivePlayerCash(playerid, 50000);
SendClientMessage(playerid,COLOR_WHITE, "{FFFFFF}Luu Y: Diem danh 3 ngay lien tuc se nhan duoc 100 Credits");
SendClientMessage(playerid,COLOR_WHITE, "{FFFFFF}Luu Y: Diem danh 10 ngay lien tuc se nhan duoc 1,000,000$ SAD");
SendClientMessage(playerid,COLOR_WHITE, "{FFFFFF}Luu Y: Diem danh 20 ngay lien tuc se nhan duoc Car Vouchers");
SendClientMessage(playerid,COLOR_WHITE, "{FFFFFF}Luu Y: Diem danh 3 ngay lien tuc se nhan duoc VIP GOLD (30 Days)");
PlayerInfo[playerid][pDiemDanh] = 1;
PlayerInfo[playerid][pNgayDiemDanh] += 1;
PlayerInfo[playerid][pDiemDanhDate] = d;
format(string, sizeof(string), "{FFFFFF}[!] Ban da diem danh hang ngay, so ngay ban diem danh hien tai la: %d", PlayerInfo[playerid][pNgayDiemDanh]);
SendClientMessage(playerid,COLOR_WHITE, string);
SendClientMessage(playerid,COLOR_LIGHTBLUE, "[?] Ban da nhan duoc 50,000$ SAD cho viec diem danh hang ngay");
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "[!] Hom nay ban da diem danh roi nhe!");
return 1;
}
return 1;
}