SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=541324)



Help - YanLanger - 11.10.2014

I got arrest command and cuff anyways

when i do /cuff it says USAGE bla bla..

same as arrest if i do /arrest 0 [me] says u cannot arrest another police officer if i do /arrest 2 [not me] says unknown command same as cuff i will not post all the code i will post what is needed so people won't copy it.

CUFF
PHP код:
CMD:cuff(playerid,params[])
{
  new 
targetid;
  if(
IsPlayerPolice[playerid] < 1)
  return 
SendClientMessage(playerid, -1"{ff0000}This command only for cops");
  if(
sscanf(params"u"targetid)) return SendClientMessage(playerid, -1"USAGE: /cuff [Part of Name/Player ID]");
  if(
IsPlayerPolice[targetid] >= 1) return  SendClientMessage(playerid, -2,  "{ff0000}You cant arrest another police officer!");
  if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
  if(
playerid == targetid) return SendClientMessage(playerid0xFF0000FF"ERROR: You can't cuff yourself"); 
ARREST
PHP код:
CMD:ar(playerid,params[]) return cmd_arrest(playeridparams);
CMD:arrest(playerid,params[])
{
  new 
targetidstr[512];
  if(
IsPlayerPolice[playerid] < 1) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: You are not cop.");
  if(
sscanf(params"u"targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
  if(
IsPlayerPolice[targetid] >= 1) return  SendClientMessage(playerid, -2,  "{ff0000}You cant arrest another police officer!");
  if(!
SetPlayerAttachedObject(targetid0194186, -0.0110000.028000, -0.022000, -15.600012, -33.699977,-81.7000350.8919991.0000001.168000)) return SendClientMessage(playerid,-1,"[ERROR] This player is not cuffed!");
  if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFF,"ERROR: This player is not connected!");
  if(
playerid == targetid) return SendClientMessage(playerid0xFFFFFFF"{ff0000}ERROR: You can't arrest yourself"); 



Re: Help - dominik523 - 11.10.2014

I think problem is not in the code you pasted here. It might be in your stocks (IsPlayerPolice etc.) or maybe in some other part of the commands. You can copy your /arrest and /cuff commands and paste them here as there are so many other RP scripts where people can find plenty of information about those two commands.


Re: Help - YanLanger - 11.10.2014

paste all of them? i mean full ?


Re: Help - dominik523 - 11.10.2014

Paste code of your commands and stocks only used in those commands.


Re: Help - YanLanger - 11.10.2014

ah could i send u in PM ? i don't really want to someone copy it :\


Re: Help - Stinged - 11.10.2014

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
ah could i send u in PM ? i don't really want to someone copy it :\


From this topic

Plus there are thousands of gamemodes and filterscripts that have arrest and cuff commands that work.