Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd(premiumall, playerid, params[])
- {
- new string[128];
- if(IsPlayerConnectedAndLoggedIn(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] == 1338) // Admin level 1338.
- {
- if(AdminDuty[playerid] > 0)
- {
- new amount;
- if(sscanf(params, "d", amount))
- {
- SendClientMessage(playerid, COLOR_HELP, "KORISTENJE: /premiumall [bodovi]");
- return 1;
- }
- if(amount > 0 && amount <= 300)
- {
- foreach(new i : Player)
- {
- if(IsPlayerConnectedAndLoggedIn(i))
- {
- PlayerInfo[i][pVip] += amount;
- // Poruka igracima.
- format(string, sizeof(string), "INFO: Dobili ste %d premium bodova od administratora %s.", amount, PlayerName[playerid]);
- SendClientMessage(i, COLOR_INFO, string); PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
- }
- }
- // Poruka adminu.
- format(string, sizeof(string), "INFO: Uspjesno ste dali svima na serveru %d premuium bodova.", amount);
- SendClientMessage(playerid, COLOR_INFO, string); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- // Upisivanje u log.
- format(string, sizeof(string), "Administrator %s je dao svima na serveru %d premium bodova.", PlayerName[playerid], amount); Log(string, "premiumall", 1);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "ERROR: Morate biti na duznosti kako bi mogli koristiti admin komande / mogucnosti.");
- PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "ERROR: Niste autorizirani da koristite ovu komandu - nemate administrator level.");
- PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement