Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/makeleader", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /makeleader [Playerid/DioImena] [Number(1-10)]");
- return 1;
- }
- new para1;
- new level;
- para1 = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- level = strvalEx(tmp);
- if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Nemoj ici ispod 0, ili iznad broja 17!"); return 1; }
- if (PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(IsPlayerConnected(para1))
- {
- if(para1 != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[para1][pMember] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Taj igrac je u organizaciji!");
- return 1;
- }
- GetPlayerName(para1, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- PlayerInfo[para1][pLeader] = level;
- format(string, sizeof(string), " Dobio si kontrolu nad zatrazenom organizacijom od strane Admina %s", sendername);
- SendClientMessage(para1, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), " Dao si %s kontrolu da vodi organizaciju broj %d.", giveplayer,level);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- if(level == 0) { PlayerInfo[para1][pChar] = 0; }
- else if(level == 1) { PlayerInfo[para1][pChar] = 288; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pRank] = 10; gTeam[para1] = 2;} //Police Force
- else if(level == 2) { PlayerInfo[para1][pChar] = 286; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pRank] = 6; gTeam[para1] = 2;} //FBI/ATF
- else if(level == 4) { PlayerInfo[para1][pChar] = 295; PlayerInfo[para1][pTeam] = 1; PlayerInfo[para1][pRank] = 6; gTeam[para1] = 1;} //EMS / Vatrogasci skin lider
- else if(level == 5) { PlayerInfo[para1][pChar] = 115; } //East Side Locos
- else if(level == 6) { PlayerInfo[para1][pChar] = 113; } //Sicilian
- else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
- else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
- else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
- else if(level == 11) { PlayerInfo[para1][pChar] = 117; } //Driving/Flying School
- else if(level == 14) { PlayerInfo[para1][pChar] = 186; } //Russian mafia
- else if(level == 15) { PlayerInfo[para1][pChar] = 270; } //Grove Street
- else if(level == 16) { PlayerInfo[para1][pChar] = 240; } //Street racers
- else if(level == 17) { PlayerInfo[para1][pChar] = 19; } //CBB
- gTeam[para1] = 17;
- PlayerInfo[para1][pTeam] = 17;
- if(PlayerInfo[para1][pChar] == 0) { SetPlayerSkin(para1, 299); }
- else { SetPlayerSkin(para1, PlayerInfo[para1][pChar]); }
- }
- }
- }
- else
- SendClientMessage(playerid, COLOR_RED, " Niste ovlasteni za koristenje ove komande!");
- return 1;
- }
- //======================================================================
- if(strcmp(cmd, "/lockfcar", true) == 0)
- {
- if (PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
- {
- for(new c = 0; c < sizeof(CarInfo); c++)
- {
- new Float:x,Float:y,Float:z;
- new carid = CarInfo[c][cID];
- GetVehiclePos(carid, x, y, z);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(IsPlayerInRangeOfPoint(playerid,3, x, y, z))
- {
- if(PlayerInfo[playerid][pMember] == CarInfo[c][cFaction] || PlayerInfo[playerid][pLeader] == CarInfo[c][cFaction])
- {
- if (CarInfo[c][cUsage] == CAR_USAGE_FACTION)
- {
- if(CarInfo[c][cLock] == 0)
- {
- foreach(Player, i)
- {
- LockCar(CarInfo[c][cID]);
- }
- GameTextForPlayer(playerid, "~w~Auto organizacije~n~~r~zakljucan", 10000, 6);
- CarInfo[c][cLock] = 1;
- format(string, sizeof(string), "* %s zakljucava automobil.", sendername);
- ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- return 1;
- }
- else if(CarInfo[c][cLock] == 1)
- {
- foreach(Player, i)
- {
- UnLockCar(CarInfo[c][cID]);
- }
- GameTextForPlayer(playerid, "~w~Auto organizacije~n~~g~otkljucan", 10000, 6);
- CarInfo[c][cLock] = 0;
- format(string, sizeof(string), "* %s otkljucava automobil.", sendername);
- ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Nemozete kljucati auto druge organizacije.");
- return 1;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Niste clan organizacije.");
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment