[DUV] Spawn no Hospital ao Morrer...
#3

Nгo entendi, esse aqui й o meu OnPlayerDeath:

Entгo, queria que quando o player Morresse ele desce spawn nas coordenadas desses Hospitais que estгo no CODE abaixo.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    TextDrawShowForPlayer(playerid, barra);

    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(!IsPlayerInArea(killerid, 1080.102, 1233.434, 1150.39, 1372.684) == true)
        if(!IsPlayerInArea(killerid, 1080.102, 1210.226, 1130.865, 1237.302) == true)
{
    if(Procurados[playerid] == 1){
    Procurados[playerid] = 0;
    Presos[playerid] = 1;
    pap_SalvarInt(playerid, "Preso", 1);
    LogarPlayer(playerid);
    }
 else{
  SendDeathMessage(killerid,playerid,reason);
        if (GetPlayerMoney(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.");
            GivePlayerCash(killerid, GetPlayerMoney(playerid));
            ResetPlayerMoney(playerid);
        }

   }
    Presos[killerid] = 1;
    pap_SalvarInt(killerid, "Preso", 1);
    ResetPlayerWeapons(killerid);
    LogarPlayer(killerid);
    pap_SalvarInt(killerid, "Matou", pap_CarregarInt(killerid, "Matou") + 1 );
    }
 return 1;
}
Reply


Messages In This Thread
[DUV] Spawn no Hospital ao Morrer... - by [NWD]Tweener_ - 30.07.2010, 22:48
Re: [DUV] Spawn no Hospital ao Morrer... - by zSuYaNw - 30.07.2010, 23:05
Re: [DUV] Spawn no Hospital ao Morrer... - by [NWD]Tweener_ - 30.07.2010, 23:41
Re: [DUV] Spawn no Hospital ao Morrer... - by [NWD]Tweener_ - 04.08.2010, 00:10
Re: [DUV] Spawn no Hospital ao Morrer... - by Falcon. - 04.08.2010, 00:22
Re: [DUV] Spawn no Hospital ao Morrer... - by zSuYaNw - 04.08.2010, 00:56
Re: [DUV] Spawn no Hospital ao Morrer... - by Falcon. - 04.08.2010, 01:16
Re: [DUV] Spawn no Hospital ao Morrer... - by zSuYaNw - 04.08.2010, 01:19
Re: [DUV] Spawn no Hospital ao Morrer... - by Falcon. - 04.08.2010, 01:32
Re: [DUV] Spawn no Hospital ao Morrer... - by [NWD]Tweener_ - 04.08.2010, 17:34

Forum Jump:


Users browsing this thread: 4 Guest(s)