[Ajuda] Prendendo usando /kill
#1

Alguem ai me ajuda fis um sistema de prender o player se ele mata atropelado so que se alguem atropela alguma player e da /kill ele vai preso alguem ai sabe como resolver isso?
Reply
#2

Cara nгo entendi '-'
Reply
#3

Esse sistema que fis e pra prender o cara se ele matar dentro do carro drive-by atropelando ta funcionando normal so que se o cara atropela nгo vai mata so se tive com pouca vida
ai acontece o seguinte o cara atropela n vai preso so que ai o player que foi atropelado da /kill e oque atropelou vai preso.
Reply
#4

Posta o comando /kill
Reply
#5

pawn Код:
if(strcmp(cmdtext, "/kill", true) == 0 || strcmp("/morrer", cmdtext, true) == 0 || strcmp("/suicidar", cmdtext, true) == 0){
if(CallRemoteFunction("LocalInvalidoParaTeleporte","i",playerid) && GetPlayerInterior(playerid) > 0) return SendClientMessage(playerid, COLOUR_ERRO, "[-ERRO-]: Vocк estб em um local em que й proibido morrer!");
SetPlayerHealth(playerid,0.0);
new message[100];
new pname[30];
GetPlayerName(playerid, pname, sizeof(pname));
format(message, sizeof(message), "{00FF00}%s Se Suicidou! {00FFFF}[/Kill]", pname);
if(IsPlayerSpawned(playerid)){SendClientMessageToAll(COLOUR_BRANCO,message);}
return 1;}
Reply
#6

O problema nгo й no comando, deve estar no seu "Sistema" de driver-by.

PHP код:
if(strcmp(cmdtext"/kill"true) == || strcmp("/morrer"cmdtexttrue) == || strcmp("/suicidar"cmdtexttrue) == 0)
{
    if(
CallRemoteFunction("LocalInvalidoParaTeleporte","i",playerid) && GetPlayerInterior(playerid) > 0) return SendClientMessage(playeridCOLOUR_ERRO"[-ERRO-]: Vocк estб em um local em que й proibido morrer!");
    
SetPlayerHealth(playerid,0.0);
    new 
message[100], pname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(messagesizeof(message), "{00FF00}%s Se Suicidou! {00FFFF}[/Kill]"pname);
    if(
IsPlayerSpawned(playerid))
    {
        
SendClientMessageToAll(COLOUR_BRANCO,message);
    }
    return 
1;

Reply
#7

pawn Код:
if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
     {
        {

            SendClientMessage(killerid,COLOUR_RED,"[DICA]: Nгo mate atropelando, ou serб preso !");

            if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 432)return
            SendClientMessage(playerid,COLOUR_DICA,"{A666FA}[INFO]: Se matar atropelando, serб preso !");

            CallRemoteFunction("LJail","ii",killerid,120000); // funзao de prender
            new killer_name[MAX_PLAYER_NAME];GetPlayerName(killerid, killer_name , MAX_PLAYER_NAME);
            new db[692];
            SendClientMessage(killerid,COLOUR_RED,"Vocк foi preso por matar atropelando. [Tempo : 2 Minutos seu noob]");
            format(db, sizeof(db), "{FFFF00}%s {D3D3D3}Foi Preso Por Matar com Veнculo. {FFFF00}[Tempo] : {FFFF00}2 Minutos] {FFFFFF}!", killer_name);
            SendClientMessageToAll(0xFFFFFFFF, db);

        }
    }
Tem algum bug?
Reply
#8

Basta bloquear o player de usar o comando prуximo a algum veнculo Existem vбrios cуdigos pelo fуrum, basta pesquisar.
Reply
#9

Ok Obrigado JF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)