/arrest cmds - 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: /arrest cmds (
/showthread.php?tid=311408)
/arrest cmds -
CWollinger - 16.01.2012
Код:
new player1 = params[0];
if(GetPlayerWantedLevel(player1) > 0){
Count[player1] = GetPlayerWantedLevel(player1);
SetPlayerPos(player1,263.7628,77.7761,1001.0391);
TogglePlayerControllable(player1,0);
Timer[player1] = SetTimerEx("release", 10000, true,"d",player1);
GameTextForPlayer(player1,"Arrested",3000,6);
ResetPlayerWeapons(player1);
SetPlayerInterior(player1,6);
}else SendClientMessage(playerid,red,"The player is not wanted");
}
return 1;
I can not arrest this player. How can i use the Params rightly
Thanks
Re: /arrest cmds -
thimo - 16.01.2012
What do you want this to do ? and please use bbcode... Makes it way easier for us too
Edit if you want to do this to other player use SSCANF
new OtherPlayer;
if(sscanf(params, "i", OtherPlayer))
AW: /arrest cmds -
CWollinger - 16.01.2012
thanks for the info
Re: /arrest cmds -
Konstantinos - 16.01.2012
pawn Код:
// At The Top
#include < a_samp >
#include < zcmd >
#include < sscanf2 >
// ----
CMD:arrest(playerid, params [ ])
{
new
player1;
if(GetPlayerWantedLevel(player1) <= 0) return SendClientMessage(playerid, red, "The player is not wanted");
if(sscanf(params, "u", player1)) return SendClientMessage(playerid, red, "SYNTAX: /arrest <ID/Part Of Name>");
Count[player1] = GetPlayerWantedLevel(player1);
SetPlayerPos(player1, 263.7628, 77.7761, 1001.0391);
TogglePlayerControllable(player1, 0);
Timer[player1] = SetTimerEx("release", 10000, true, "d", player1);
GameTextForPlayer(player1, "Arrested", 3000, 6);
ResetPlayerWeapons(player1);
return SetPlayerInterior(player1, 6);
}