Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "a_samp"
- #include "Pawn.CMD"
- #include "sscanf2"
- main()
- {
- print("Hazze");
- }
- enum vipInfo
- {
- VIPBodovi
- }
- new vip_Info[MAX_PLAYERS][vipInfo];
- new game_string[128];
- CMD:setvip(playerid, const params[])
- {
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, -1, "Niste ulogovani kao RCON administrator.");
- extract params -> new id, bodovi; else
- {
- return SendClientMessage(playerid, -1, "/setvip (id/ime_prezime) (bodovi)");
- }
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, -1, "Igrac nije konektovan.");
- if(bodovi < 0 || bodovi >= 1000)
- return SendClientMessage(playerid, -1, "Bodovi ne mogu ici u minus i preko 1000");
- vip_Info[id][VIPBodovi] = bodovi;
- if(bodovi == 0)
- {
- SendClientMessage(id, -1, "Postavljeni su vam VIP bodovi na nulu. Ukoliko mislite da je ovo greskom ucinjeno javite se adminu.");
- }
- else
- {
- format(game_string, sizeof(game_string), "Postavljeni su vam VIP bodovi na %i, od admina %s(%i)", bodovi, GetName(playerid), playerid);
- SendClientMessage(id, -1, game_string);
- game_string[0] = EOS;
- format(game_string, sizeof(game_string), "Postavili ste igracu %s(%i) VIP bodove na %i", GetName(id), id, bodovi);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- }
- return true;
- }
- CMD:fixveh(playerid, const params[])
- {
- if(vip_Info[playerid][VIPBodovi] <= 0)
- return SendClientMessage(playerid, -1, "Nemate VIP bodova.");
- extract params -> new heltivozila; else
- {
- return SendClientMessage(playerid, -1, "/fixveh (helti vozila");
- }
- if(heltivozila < 600 || heltivozila >= 1000)
- return SendClientMessage(playerid, -1, "Helte vozila ne mozete namjestiti ispod 600 ili preko 1000.");
- new vehicleid = GetPlayerVehicleID(playerid);
- new Float:health = GetVehicleHealth(vehicleid, health);
- if(health >= 400.1)
- return SendClientMessage(playerid, -1, "Ne mozete popraviti vozilo jer vase vozilo ima preko 400 helti.");
- SetVehicleHealth(vehicleid, heltivozila);
- format(game_string, sizeof(game_string), "Postavili ste helte vozila na %i.", heltivozila);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- vip_Info[playerid][VIPBodovi] --;
- format(game_string, sizeof(game_string), "Trenutni VIP bodovi %i", vip_Info[playerid][VIPBodovi]);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- return true;
- }
- CMD:mycc(playerid, const params[])
- {
- if(vip_Info[playerid][VIPBodovi] <= 0)
- return SendClientMessage(playerid, -1, "Nemate VIP bodova.");
- ClearPlayerChat(playerid);
- SendClientMessage(playerid, -1, "Ocistili ste sebi chat.");
- vip_Info[playerid][VIPBodovi] --;
- format(game_string, sizeof(game_string), "Trenutni VIP bodovi %i", vip_Info[playerid][VIPBodovi]);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- return true;
- }
- CMD:myip(playerid, const params[])
- {
- if(vip_Info[playerid][VIPBodovi] <= 0)
- return SendClientMessage(playerid, -1, "Nemate VIP bodova.");
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- format(game_string, sizeof(plrIP), "Vasa trenutna IP adresa je %s", plrIP);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- vip_Info[playerid][VIPBodovi] --;
- format(game_string, sizeof(game_string), "Trenutni VIP bodovi %i", vip_Info[playerid][VIPBodovi]);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- return true;
- }
- CMD:setfightingstyle(playerid, const params[])
- {
- if(vip_Info[playerid][VIPBodovi] <= 0)
- return SendClientMessage(playerid, -1, "Nemate VIP bodova.");
- extract params -> new stilborenja; else
- {
- return SendClientMessage(playerid, -1, "/setfightingstyle (4 - normalan, 5 - box, 6 - kung fu, 7 - kneehead, 15 - grabkick, 16 - elbow)");
- }
- if(stilborenja == 4)
- {
- SendClientMessage(playerid, -1, "Odabrali ste normalan nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
- }
- else if(stilborenja == 5)
- {
- SendClientMessage(playerid, -1, "Odabrali ste box nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
- }
- else if(stilborenja == 6)
- {
- SendClientMessage(playerid, -1, "Odabrali ste kung fu nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
- }
- else if(stilborenja == 7)
- {
- SendClientMessage(playerid, -1, "Odabrali ste koljeno u glavu(kneehead) nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
- }
- else if(stilborenja == 15)
- {
- SendClientMessage(playerid, -1, "Odabrali ste uhvatanje i udaranje(grabkick) nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
- }
- else if(stilborenja == 16)
- {
- SendClientMessage(playerid, -1, "Odabrali ste elbow nacin borenja.");
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
- }
- else SendClientMessage(playerid, -1, "Error");
- vip_Info[playerid][VIPBodovi] --;
- format(game_string, sizeof(game_string), "Trenutni VIP bodovi %i", vip_Info[playerid][VIPBodovi]);
- SendClientMessage(playerid, -1, game_string);
- game_string[0] = EOS;
- return true;
- }
- CMD:viphelp(playerid, const params[])
- {
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "VIP KOMANDE", "/fixveh (helti vozila) - popravkak vozila\n/mycc - ciscenje chata\n/myip - provjera Vase trenutne IP adres\n/setfightingstyle - nacin borenja\n/viphelp - pomoc oko komandi", "Zatvori", "");
- return true;
- }
- GetName(playerid)
- {
- static name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- ClearPlayerChat(playerid)
- {
- for(new i = 0; i != 32; i++) SendClientMessage(playerid, 0xFFFFFFFF, " ");
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment