[Tutorial] [TUT] Checar Бrea Player
#18

DraKoN kenga, me salva manolo, й o seguinte, eu atй criei um outro tуpico por que eu nгo achei esse. Mas aqui vai eu:

Quero que uma funзгo nгo funcione em uma determinada area, como eu faria? Para que sу na area definida essa funзгo nгo funcionasse? (A funзгo que me refiro й de prender o player se matar)

------------@EDIT

Esqueci jб consegui. Cara, a cada dia o SA:MP me surpreende mais. . .

-----------@EDITІ

Bom, testei agora, e o player morto, estб dando spawn em outro lugar ao invйs de dar spawn nos hospitais.

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(!IsPlayerInArea(killerid, 1076.198, 1210.226, 1154.294, 1372.684) == true)
{
    if(GetClosestHospital(playerid) == 0){
        SetSpawnInfo(playerid, 1, pap_CarregarInt(playerid, "Skin"), -2651.6501, 634.4510, 14.4531, 180.0000, 0, 0, 0, 0, 0, 0);
    }
    else if(GetClosestHospital(playerid) == 1){
        SetSpawnInfo(playerid,1,pap_CarregarInt(playerid, "Skin"),1173.5842,-1324.5615,15.1953,278.4624,0,0,0,0,0,0);
    }
    else if(GetClosestHospital(playerid) == 2){
        SetSpawnInfo(playerid,1,pap_CarregarInt(playerid, "Skin"),2031.9415,-1404.3578,17.2614,165.8180,0,0,0,0,0,0);
    }
    else if(GetClosestHospital(playerid) == 3){
        SetSpawnInfo(playerid,1,pap_CarregarInt(playerid, "Skin"),1582.5615,1768.7921,10.8203,93.7454,0,0,0,0,0,0);
    }
    SendClientMessage(playerid, COLOR_YELLOW, "[HOSPITAL]Os mйdicos do Hospital pъblico nгo lhe combraram nada!");
    pap_SalvarInt(playerid, "Dinheiro_banco", pap_CarregarInt(playerid, "Dinheiro_banco") - 0 );
    pap_SalvarInt(playerid, "Morreu", pap_CarregarInt(playerid, "Morreu") + 1 );


    if(Procurados[playerid] == 1){
    Procurados[playerid] = 0;
    Presos[playerid] = 1;
    pap_SalvarInt(playerid, "Preso", 1);
    LogarPlayer(playerid);
    }
 else{
        SendDeathMessage(killerid,playerid,reason);
        if (patd_PegarDinheiroJogador(playerid) > 0)  {
            SendClientMessage(playerid,COLOR_WHITE,"[HOSPITAL] Alйm disso, um assassino cara de pau robou toda sua grana,");
            SendClientMessage(playerid,COLOR_WHITE,"[HOSPITAL] enquanto vocк estava agonizando na beira da morte no chгo.");
            patd_ManipularDinheiro(killerid, patd_PegarDinheiroJogador(playerid));
            patd_ZerarDinheiroJogador(playerid);
        }

      }
    Preso[killerid] = 1;
    pap_SalvarInt(killerid, "Preso", 1);
    ResetPlayerWeapons(killerid);
    LogarPlayer(killerid);
    pap_SalvarInt(killerid, "Matou", pap_CarregarInt(killerid, "Matou") + 1 );
    }
    return 1;
}
Funciona perfeito, a nгo ser pelo fato do player morto na бrea dar spawn no mesmo lugar do comando /fianca, e nгo no spawn do hospital.

Alguйm sabe arrumar зabagaзa?
Reply


Messages In This Thread
[TUT] Checar Бrea Player - by ipsBruno - 29.05.2010, 04:07
Re: [TUT] Checar Бrea Player - by Gil_Henriquee - 29.05.2010, 04:11
Re: [TUT] Checar Бrea Player - by zSuYaNw - 29.05.2010, 04:20
Re: [TUT] Checar Бrea Player - by Rick_DR - 29.05.2010, 11:00
Re: [TUT] Checar Бrea Player - by DartakousLien - 29.05.2010, 11:37
Re: [TUT] Checar Бrea Player - by ipsBruno - 29.05.2010, 18:48
Re: [TUT] Checar Бrea Player - by [BR]JD - 29.05.2010, 20:39
Re: [TUT] Checar Бrea Player - by [NWD]Tweener_ - 29.05.2010, 20:40
Re: [TUT] Checar Бrea Player - by ipsBruno - 29.05.2010, 20:55
Re: [TUT] Checar Бrea Player - by [NWD]Tweener_ - 29.05.2010, 21:22
Re: [TUT] Checar Бrea Player - by DartakousLien - 29.05.2010, 21:24
Re: [TUT] Checar Бrea Player - by Scratchy_Nutz - 29.05.2010, 22:32
Re: [TUT] Checar Бrea Player - by [NWD]Tweener_ - 29.05.2010, 22:34
Re: [TUT] Checar Бrea Player - by DartakousLien - 29.05.2010, 23:36
Re: [TUT] Checar Бrea Player - by ipsBruno - 30.05.2010, 01:01
Re: [TUT] Checar Бrea Player - by DartakousLien - 30.05.2010, 09:00
Re: [TUT] Checar Бrea Player - by andmeida10 - 30.05.2010, 13:17
Re: [TUT] Checar Бrea Player - by [NWD]Tweener_ - 14.07.2010, 01:41
Re: [TUT] Checar Бrea Player - by BiieL - 14.07.2010, 16:57
Re: [TUT] Checar Бrea Player - by [NWD]Tweener_ - 14.07.2010, 20:44
Re: [TUT] Checar Бrea Player - by sergio_xd - 22.07.2010, 16:49
Re: [TUT] Checar Бrea Player - by [BR]JD - 10.08.2010, 15:06
Re: [TUT] Checar Бrea Player - by nexco - 24.08.2010, 23:54
Re: [TUT] Checar Бrea Player - by Link_ - 25.08.2010, 00:33
Re: [TUT] Checar Бrea Player - by LeLeTe - 25.08.2010, 00:54
Respuesta: [TUT] Checar Бrea Player - by ipsBruno - 25.08.2010, 02:14
Re: Respuesta: [TUT] Checar Бrea Player - by nexco - 25.08.2010, 10:12
Re: [TUT] Checar Бrea Player - by Canabis - 25.08.2010, 10:46
Re: [TUT] Checar Бrea Player - by Link_ - 25.08.2010, 14:05
Re: [TUT] Checar Бrea Player - by nexco - 25.08.2010, 15:00
Re: [TUT] Checar Бrea Player - by Shelby - 17.09.2010, 16:48
Re: [TUT] Checar Бrea Player - by matheuzinho - 17.09.2010, 16:51
Re: [TUT] Checar Бrea Player - by Shelby - 17.09.2010, 16:56
Re: [TUT] Checar Бrea Player - by matheuzinho - 17.09.2010, 17:04
Re: [TUT] Checar Бrea Player - by Shelby - 17.09.2010, 17:35
Re: [TUT] Checar Бrea Player - by matheuzinho - 17.09.2010, 18:48
Re: [TUT] Checar Бrea Player - by StreetGT - 01.10.2010, 00:24
Re: [TUT] Checar Бrea Player - by rene20 - 01.10.2010, 15:45

Forum Jump:


Users browsing this thread: 7 Guest(s)