Ajuda Hospital
#1

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?
Reply
#2

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...
Reply
#3

Gente que feio reviver tуpicos..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)