30.07.2010, 22:48
Й o seguinte, estou com um probleminha aqui, quando o player morre, ao invйs de spawnar no Hospital, ele esta spawnando no seu Spawn inicial de quando loga. Alguem sabe como resolver isso?
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;
}
UP /RoamTem Tempo Jб OTуpico |
public OnPlayerDeath(playerid, killerid)
{
SetPlayerPos(playerid,x,y,z);
// Playerid - Quem Morreu
// Killerid - Quem Matou
return 1;
}
public OnPlayerDeath(playerid, killerid) { SetPlayerPos(playerid,x,y,z); // Playerid - Quem Morreu // Killerid - Quem Matou return 1; } |
]C:\Documents and Settings\Falcon_Sixe\Desktop\NovoProjeto.pwn(212) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.] |
SetplayerPos(playerid,-2662.39,615.43,14.45) |