SA-MP Forums Archive
Ajuda Hospital - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Ajuda Hospital (/showthread.php?tid=116650)



Ajuda Hospital - [NoD]Gui - 29.12.2009

Tipo ta minha linha de hospital


public OnPlayerDeath(playerid, killerid, reason)
Quote:

MedicBill[playerid] = 1;

public SetPlayerSpawn(playerid)
Quote:

if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
new string[256];
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;

SetPlayerPos(playerid, 1177.4150,-1323.5944,14.0696);
SetPlayerInterior(playerid, 0);
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
TogglePlayerControllable(playerid, 1);
return 1;
}

public OnPlayerConnect(playerid)
Quote:

MedicBill[playerid] = 0;

O cara quando morre nasce no hosp mas quando o jogador loga ele nasce na frente do hospital a nгo ser q tenha casa!

Alguem pode me ajudar?


Re: Ajuda Hospital - pmkrz - 29.12.2009

Para que o teu source nгo esteja a funcionar bem, sу vejo este problema:

pawn Code:
public OnPlayerConnect(playerid) {
    MedicBill[playerid] = 1;
    return true; }
Portanto, deixo-te aquilo um possivel source:

pawn Code:
#include a_samp

#define MAX_SERVER_PLAYERS 500

new
    MedicBill[MAX_SERVER_PLAYERS];

public OnPlayerConnect(playerid) {
    MedicBill[playerid] = 0; // Repara
    return true; }
   
public OnPlayerDeath(playerid, killerid, reason) {
  MedicBill[playerid] = 1;
  return true; }
   
public OnPlayerSpawn(playerid) {
    if(MedicBill[playerid] == 1) {
      SetPlayerPos(playerid, Float:X, Float:Y, Float:Z); } // Spawnposition: Hospital
    return true; }

/* EOS */
ps. Criei uma nova conta para ver se vos ajudo...


Re: Ajuda Hospital - Eddye - 16.02.2015

Gente que feio reviver tуpicos..