Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/jail", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /jail [playerid/PartOfName] [time(minutes)]");
- return 1;
- }
- new playa;
- new money;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- money = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You Jailed %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- format(string, sizeof(string), "* You were Jailed by Admin %s.", sendername);
- SendClientMessage(playa, COLOR_LIGHTRED, string);
- ResetPlayerWeapons(playa);
- WantedPoints[playa] = 0;
- PlayerInfo[playa][pJailed] = 2;
- PlayerInfo[playa][pJailTime] = money*60;
- SetPlayerInterior(playa, 0);
- JailPrice[id] = 0;
- new rand;
- rand = random(sizeof(gRandomJailSpawns));
- SetPlayerPos(id,gRandomJailSpawns[rand][0],gRandomJailSpawns[rand][1],gRandomJailSpawns[rand][2]);
- format(string, sizeof(string), "You are jailed for %d minutes. Bail: Unable", money);
- SendClientMessage(playa, COLOR_LIGHTBLUE, string);
- format(string, 128, "%s has jailed %s for %d minutes.", sendername,giveplayer,money);
- ABroadCast(COLOR_YELLOW,string,1);
- TextDrawShowForPlayer(id, JailTD[id]);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Nu ai dreptul de a utiliza aceasta comanda!");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement