As vrea sa pot da /cuff fara sa dau /tazer si cand dau /arrest sa il trimita in celula si bani sa-i ia corespunzator. Sper sa ma puteti ajuta ca ma dispera problema. |
if(strcmp(cmd, "/arrest", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}you are not on duty!"); return 1; } if(!PlayerToPoint(6.0, playerid, 1526.8973,-1678.2036,5.8906)) {// Jail spot SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti langa inchisoare,nu poti aresta !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Pretul nu poate fi mai mic de 1$ sau mai mare de 1000$ !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new time = strval(tmp); if(time < 1 || time > 6000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Secundele arestarii nu pot fi mai putine de 1, sau mai mare de 6000, !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bail = strval(tmp); if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Bail nu poate fi mai putin de 0 sau mai mult de 1 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bailprice = strval(tmp); if(bailprice < 0 || bailprice > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Amenda nu poate fi mai mica de 0$ sau mai mare de 1000$ !"); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(WantedLevel[suspect] < 1) return SendClientMessage(playerid, COLOR_GREY, "{ffffff}Playerul trebuie sa aiba macar level 1 wanted !"); if(IsACop(suspect)) return SendClientMessage(playerid,COLOR_GREY,"Nu poti aresta politisti"); format(string, sizeof(string), "* You arrested %s !", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(suspect, -moneys); format(string, sizeof(string), "arrested by %s ~n~ for $%d", sendername, moneys); GameTextForPlayer(suspect, string, 5000, 5); ResetPlayerWeapons(suspect); if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1) { format(string, sizeof(string), "<< Ofiterul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2) { format(string, sizeof(string), "<<Agentul FBI %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3) { format(string, sizeof(string), "<< Soldatul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } new rand; SetPlayerInterior(suspect, 0 ); rand = random(sizeof(gTurmaProg)); SetPlayerPos(suspect, gTurmaProg[rand][0], gTurmaProg[rand][1], gTurmaProg[rand][2]); SetPlayerWorldBounds(suspect,219.44728088379,69.380714416504,1005.0390625); //Ограждение прог. зоны PlayerInfo[suspect][pJailTime] = time; if(bail == 1) { JailPrice[suspect] = bailprice; format(string, sizeof(string), "Ai fost arestat pentur %d secunde. Cautiune: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } else { JailPrice[suspect] = 0; format(string, sizeof(string), "Ai fost arestat pentur %d secunde. Cautiune: 0", PlayerInfo[suspect][pJailTime]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pArrested] += 1; SetPlayerFree(suspect,playerid, "ai fost arestat"); WantedPoints[suspect] = 0; WantedLevel[suspect] = 0; WantLawyer[suspect] = 1; }//distance }//not connected else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu exista acest player"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti Cop / FBI / National Guard !"); return 1; } }//not connected return 1;
if(strcmp(cmd, "/cuff", true) == 0) //By Raz0r { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid)) { SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !"); return 1; } if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; } if(PlayerCuffed[giveplayerid] == 1 || GetPlayerSpecialAction(giveplayerid) == SPECIAL_ACTION_HANDSUP) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3); TogglePlayerControllable(giveplayerid, 0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); PlayerCuffed[giveplayerid] = 2; PlayerCuffedTime[giveplayerid] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " That player isn't Restrained !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is Offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a LVPD / FBI / LSPD!"); } } return 1;
if(strcmp(cmd, "/cuff", true) == 0) //By Raz0r { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid)) { SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !"); return 1; } if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3); TogglePlayerControllable(giveplayerid, 0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0); PlayerCuffed[giveplayerid] = 2; PlayerCuffedTime[giveplayerid] = 9999; } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is Offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a LVPD / FBI / LSPD!"); } } return 1; }
if(strcmp(cmd, "/arrest", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}you are not on duty!"); return 1; } if(!PlayerToPoint(6.0, playerid, 1526.8973,-1678.2036,5.8906)) {// Jail spot SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti langa inchisoare,nu poti aresta !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Pretul nu poate fi mai mic de 1$ sau mai mare de 1000$ !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new time = strval(tmp); if(time < 1 || time > 6000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Secundele arestarii nu pot fi mai putine de 1, sau mai mare de 6000, !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bail = strval(tmp); if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Bail nu poate fi mai putin de 0 sau mai mult de 1 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bailprice = strval(tmp); if(bailprice < 0 || bailprice > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Amenda nu poate fi mai mica de 0$ sau mai mare de 1000$ !"); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(WantedLevel[suspect] < 1) return SendClientMessage(playerid, COLOR_GREY, "{ffffff}Playerul trebuie sa aiba macar level 1 wanted !"); if(IsACop(suspect)) return SendClientMessage(playerid,COLOR_GREY,"Nu poti aresta politisti"); format(string, sizeof(string), "* You arrested %s !", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(suspect, -moneys); new string2[256]; format(string2,sizeof(string2), "Ai fost taxat cu %d $", moneys); SendClientMessage(suspect,COLOR_GRAD2,string2); format(string, sizeof(string), "arrested by %s ~n~ for $%d", sendername, moneys); GameTextForPlayer(suspect, string, 5000, 5); ResetPlayerWeapons(suspect); if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1) { format(string, sizeof(string), "<< Ofiterul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2) { format(string, sizeof(string), "<<Agentul FBI %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3) { format(string, sizeof(string), "<< Soldatul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } new rand; SetPlayerInterior(suspect, 6 ); rand = random(sizeof(gTurmaProg)); SetPlayerPos(suspect,264.6288,77.5742,1001.0391); SetPlayerWorldBounds(suspect,219.44728088379,69.380714416504,1005.0390625); //Оa~?a`?дa*нe`a* i"?оa~. зонu^ PlayerInfo[suspect][pJailTime] = time; if(bail == 1) { JailPrice[suspect] = bailprice; format(string, sizeof(string), "Ai fost arestat pentru %d secunde. Cautiune: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } else { JailPrice[suspect] = 0; format(string, sizeof(string), "Ai fost arestat pentru %d secunde. Cautiune: 0", PlayerInfo[suspect][pJailTime]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pArrested] += 1; SetPlayerFree(suspect,playerid, "ai fost arestat"); WantedPoints[suspect] = 0; WantedLevel[suspect] = 0; WantLawyer[suspect] = 1; }//distance }//not connected else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu exista acest player"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti Cop / FBI / National Guard !"); return 1; } }//not connected return 1; }
aici urmeaza deja comanda /contract deci am postat intreg codul sau lipseste in sursa
urmeaza comanda /carcuff si scrie ca tre sa folosesc /cuff return 1; } if(strcmp(cmd, "/carcuff", true) == 0)
if(strcmp(cmd, "/arrest", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}you are not on duty!"); return 1; } if(!PlayerToPoint(6.0, playerid, 1526.8973,-1678.2036,5.8906)) {// Jail spot SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti langa inchisoare,nu poti aresta !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Pretul nu poate fi mai mic de 1$ sau mai mare de 1000$ !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new time = strval(tmp); if(time < 1 || time > 6000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Secundele arestarii nu pot fi mai putine de 1, sau mai mare de 6000, !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bail = strval(tmp); if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Bail nu poate fi mai putin de 0 sau mai mult de 1 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, " {FFA500}[INFO]:{ffffff} /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]"); return 1; } new bailprice = strval(tmp); if(bailprice < 0 || bailprice > 1000) { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Amenda nu poate fi mai mica de 0$ sau mai mare de 1000$ !"); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(WantedLevel[suspect] < 1) return SendClientMessage(playerid, COLOR_GREY, "{ffffff}Playerul trebuie sa aiba macar level 1 wanted !"); if(IsACop(suspect)) return SendClientMessage(playerid,COLOR_GREY,"Nu poti aresta politisti"); format(string, sizeof(string), "* You arrested %s !", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GetPlayerMoney(suspect, moneys); new string2[256]; format(string2,sizeof(string2), "Ai fost taxat cu %d $", moneys); SendClientMessage(suspect,COLOR_GRAD2,string2); format(string, sizeof(string), "arrested by %s ~n~ for $%d", sendername, moneys); GameTextForPlayer(suspect, string, 5000, 5); ResetPlayerWeapons(suspect); if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1) { format(string, sizeof(string), "<< Ofiterul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2) { format(string, sizeof(string), "<<Agentul FBI %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3) { format(string, sizeof(string), "<< Soldatul %s a arestat suspectul %s >>", sendername, giveplayer); OOCNews(COLOR_RED, string); } new rand; SetPlayerInterior(suspect, 6 ); rand = random(sizeof(gTurmaProg)); SetPlayerPos(suspect,264.6288,77.5742,1001.0391); SetPlayerWorldBounds(suspect,219.44728088379,69.380714416504,1005.0390625); //Оa~?a`?дa*нe`a* i"?оa~. зонu^ PlayerInfo[suspect][pJailTime] = time; if(bail == 1) { JailPrice[suspect] = bailprice; format(string, sizeof(string), "Ai fost arestat pentru %d secunde. Cautiune: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } else { JailPrice[suspect] = 0; format(string, sizeof(string), "Ai fost arestat pentru %d secunde. Cautiune: 0", PlayerInfo[suspect][pJailTime]); SendClientMessage(suspect, COLOR_LIGHTBLUE, string); } PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pArrested] += 1; SetPlayerFree(suspect,playerid, "ai fost arestat"); WantedPoints[suspect] = 0; WantedLevel[suspect] = 0; WantLawyer[suspect] = 1; }//distance }//not connected else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu exista acest player"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "{ffffff}Nu esti Cop / FBI / National Guard !"); return 1; } }//not connected return 1; }