Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/cuff", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Spieler[playerid][Team] == 1 || Spieler[playerid][Team] == 2 || Spieler[playerid][Team] == 14)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /cuff [ID/Name]");
- return 1;
- }
- new pID = ReturnUser(tmp), string[128];
- if(IsPlayerConnected(pID))
- {
- if(pID != INVALID_PLAYER_ID)
- {
- if(Spieler[pID][Team] == 1 || Spieler[pID][Team] == 2 || Spieler[playerid][Team] == 14)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "Du kannst keine anderen Beamten Handschellen anlegen.");
- }
- if(Cuffed[pID] == 1)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "Der Spieler ist bereits gecufft.");
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(pID, x,y,z);
- if(IsPlayerInRangeOfPoint(playerid, 8, x,y,z))
- {
- if(pID == playerid)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "Du kannst dich selber nicht fesseln.");
- }
- format(string, sizeof(string), "* Beamter %s hat dir Handschellen angelegt.", SpielerName(playerid));
- SendClientMessage(pID, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* Du hast %s Handschellen angelegt.", SpielerName(pID));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "** Beamter %s hat %s Handschellen angelegt.", SpielerName(playerid), SpielerName(pID));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GameTextForPlayer(pID, "~r~Festgenommen", 2500, 3);
- FreezePlayer(pID);
- Cuffed[pID] = 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Der Spieler ist nicht in deiner Nähe.");
- return 1;
- }
- }
- }
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Beamter.");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement