Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <foreach>
- #define SCM SendClientMessage
- #define SCMALL SendClientMessageToAll
- new Bulangiu[MAX_PLAYERS],
- FastGiftPoints = 0;
- CMD:fastgift(playerid)
- {
- if(Bulangiu[playerid] == 1) return SCM(playerid, -1, "Ai luat deja un cadou, asteapta pana reseteaza un admin.");
- if(FastGiftPoints == 0) return SCM(playerid, -1, "Sunt 0 cadouri nu este resetat fast gift-ul.");
- Bulangiu[playerid] = 1;
- if(FastGiftPoints == 1)
- {
- // Aici poti adauga ce vrei sa primeasca la cadoul 1 (bani , masina , casa , level)
- FastGiftPoints = 2;
- SCMALL(-1, "Mai sunt 4 cadouri.");
- }
- else if(FastGiftPoints == 2)
- {
- // Aici poti adauga ce vrei sa primeasca la cadoul 2 (bani , masina , casa , level)
- FastGiftPoints = 3;
- SCMALL(-1, "Mai sunt 3 cadouri.");
- }
- else if(FastGiftPoints == 3)
- {
- // Aici poti adauga ce vrei sa primeasca la cadoul 3 (bani , masina , casa , level)
- FastGiftPoints = 4;
- SCMALL(-1, "Mai sunt 2 cadouri.");
- }
- else if(FastGiftPoints == 4)
- {
- // Aici poti adauga ce vrei sa primeasca la cadoul 4 (bani , masina , casa , level)
- FastGiftPoints = 5;
- SCMALL(-1, "Mai este 1 cadou.");
- }
- else if(FastGiftPoints == 5)
- {
- // Aici poti adauga ce vrei sa primeasca la cadoul 5 (bani , masina , casa , level)
- FastGiftPoints = 0;
- SCMALL(-1, "Nu mai sunt cadouri, pana activeaza un admin /resetfastgift.");
- }
- return 1;
- }
- CMD:resetfastgift(playerid)
- {
- foreach(new i : Player)
- {
- Bulangiu[playerid] = 0;
- }
- FastGiftPoints = 1;
- SCMALL(-1, "Un admin a bagat iar Fast Gift, hai si tu /gps > Fast Gift.");
- return 1;
- }
Add Comment
Please, Sign In to add comment