I need a "/prison [Id] [Minutes] [Reason]" command
#1

As the title says, i need a /prison command which has a reason and on how many minutes you want the guy prisoned. Can someone help me with this please?
Reply
#2

http://forum.sa-mp.com/index.php?action=search
Reply
#3

Quote:
Originally Posted by Jakku
You think i ask without even trying to search first? Lol i tried to find it, but i failed, so i just made a thread about it, maybe someone will help me
Reply
#4

Quote:

I need a "/prison [Id] [Minutes] [Reason]" command

Script request topic.
Reply
#5

just search ladmin script for /jail and edit the co ordinates if you want to be really lazy
Reply
#6

Код:
		if(!strcmp(cmdtext, "/prison", true,5))
		{
 			new vardas[MAX_PLAYER_NAME],prz[128];
			strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
			if(!strcmp(vardas, "0", true) ){SendClientMessage(playerid, 0xD9E916FF, "* Move player to prison: /prison [name] [seconds]"); return 1;}
			new id = GetPlayeridMid(vardas);
			if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0xD9E916FF, "* Invalid name"); return 1;}
			if (playerDB[id][admin]){ SendClientMessage(playerid, 0xD9E916FF, "* You cant move administrator to prison."); return 1;}

      strmid(prz,GetArgument(2, cmdtext,true),0,128);
			if(!IsNumeric(prz)){SendClientMessage(playerid, 0xD9E916FF, "*Wrong time."); return 1;}
			new laikas = StringToInt(prz);

      new msg[128];
	  	GetPlayerName(id,vardas,sizeof(vardas));
      JailPlayer(id,227.3138,108.9786,999.0156,0,laikas*1000,10,-1597.6338,716.4904,11.7759,341.3682,0,true);
    	format(msg,sizeof(msg),"[prison] You jailed %s (%is).",vardas,laikas);
    	SendClientMessage(id,0xD9E916FF,"* You have jailed by administrator.");
			SendClientMessage(playerid,0xD9E916FF,msg);
			return 1;
		}
Im not sure is it good script but lets try
Reply
#7

Nevermind guys, i've found it on a GameMode, but thank you anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)