/arrest cmds
#1

Код:
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
Reply
#2

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))
Reply
#3

thanks for the info
Reply
#4

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);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)