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, "Utiliza: /Jail [ID/Nombre] [Tiempo] [Razón]");
- return 1;
- }
- new playa;
- new length = strlen(cmdtext);
- new money;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- money = strval(tmp);
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /Jail [ID/Nombre] [Tiempo] [Razón]");
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] < 2012)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* Jaileaste a: %s. Razón: %s", giveplayer, (result));
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- format(string, sizeof(string), "* Fuiste Jaileado por el STAFF %s, Razón: %s", sendername, (result));
- SendClientMessage(playa, COLOR_LIGHTRED, string);
- format(string, sizeof(string), "Administración: %s ha Jaileado a %s, %d minutos, Razón: %s.", sendername,giveplayer,money,(result));
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- ResetPlayerWeapons(playa);
- WantedPoints[playa] = 0;
- PlayerInfo[playa][pJailed] = 1;
- PlayerInfo[playa][pJailTime] = money*60;
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playa, -571.6538,-3528.4221,-0.3773);
- format(string, sizeof(string), "Estás Jaileado por %d minutos.", money);
- SendClientMessage(playa, COLOR_LIGHTBLUE, string);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "No estás autorizado para usar este comando.");
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment