12.08.2013, 02:10
Quote:
Poste uma parte do Onplayerdeath e do onplayer spawn por favor. (pelo menos 15 linhas)
|
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[playerid][pVIP] < 1 && SistemaHospital == 1 && helpertrampando[playerid] < 1 && admtrampando[playerid] < 1)
{
if(PlayerInfo[playerid][pJailed] >= 1){return SendClientMessage(playerid,COLOR_LIGHTRED,"Vocк Saiu do Hospital e Foi Preso");}
if(PlayerInfo[playerid][pOrigem] == 2)
{
SendClientMessage(playerid, COLOR_GRAD2, "[Informaзгo] Vocк serб internado no hospital da sua cidade {FFFFFF}(Hospital Regional de Vila Medeiros)");
PlayerInfo[playerid][pTempoHospitalizado] = 90;
storeexit[playerid] = 4;
PlayerInfo[playerid][pHospitalID] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "[Informaзгo] Vocк serб internado no hospital da sua cidade {FFFFFF}(Hospital Regional de JD.Brasil)");
PlayerInfo[playerid][pTempoHospitalizado] = 90;
storeexit[playerid] = 5;
PlayerInfo[playerid][pHospitalID] = 2;
}
}
if(PlayerInfo[playerid][pVIP] > 0 && SistemaHospital == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк й um player VIP e nгo precisarб ir para o Hospital OU!");
}
if(concorrendoevento[playerid] == 1)
{
concorrendoevento[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
if(corridainiciada) { checknumero[playerid] = 0; }
if(dirtiniciado) { checknumerodirt[playerid] = 0; }
}
StopPlayerHoldingObject(playerid);
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
else
{
SendDeathMessage(killerid,playerid,reason);
}
if(PlayerInfo[killerid][pJailed] == 2 && PlayerInfo[playerid][pJailed] == 2)
{
SendClientMessage(killerid, COLOR_RED,"Vocк foi Kickado por Cometer DM na Cela Admin.");
Kick(killerid);
//return 1;
}
new Float:px,Float:py,Float:pz;
PlayerInactivity[playerid] = 0;
DropWeapons(playerid);
DropVida(playerid);
HaveTaser[playerid] = 0;
SetPVarInt(playerid, "spawned", false);
gPlayerSpawned[playerid] = 0;
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
spawnado[playerid] = 0;
if (gPlayerTerminal[playerid] != 0)
{
BusrouteEnd(playerid);
}
if(PlayerPaintballing[killerid] == 0)
{
SetPlayerCriminal(killerid, 255, "Assasinato");
PlayerInfo[killerid][pKills] += 1;
}
if(TendoGuerra == 1 && IsPlayerInTerritorio(playerid) && IsPlayerInTerritorio(killerid))
{
if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3)
{
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
Territorio[talmortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
Territorio[almortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pLider] == 28)
{
Territorio[hamamortos] += 1;
}
}
if(PlayerInfo[killerid][pMembro] == 6 || PlayerInfo[killerid][pLider] == 6)
{
if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
{
Territorio[exemortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
Territorio[almortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pLider] == 28)
{
Territorio[hamamortos] += 1;
}
}
if(PlayerInfo[killerid][pMembro] == 15 || PlayerInfo[killerid][pLider] == 15)
{
if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
{
Territorio[exemortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
Territorio[talmortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pLider] == 28)
{
Territorio[hamamortos] += 1;
}
}
if(PlayerInfo[killerid][pMembro] == 28 || PlayerInfo[killerid][pLider] == 28)
{
if(PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)
{
Territorio[hamamortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLider] == 6)
{
Territorio[talmortos] += 1;
}
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15)
{
Territorio[almortos] += 1;
}
}
}
pawn Код:
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
TextDrawShowForPlayer(playerid,FPS[playerid]);
TextDrawShowForPlayer(playerid,pingping[playerid]);
TextDrawShowForPlayer(playerid, TextDrawdeData[playerid]);
TextDrawShowForPlayer(playerid, TextDrawdeHora[playerid]);
AntiDeAMX();
HaveTaser[playerid] = 0;
SetPVarInt(playerid, "spawned", true);
if(IsPlayerNPC(playerid)) //teste bot
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
if(!strcmp(npcname, "bot_detrem", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
{
PutPlayerInVehicle(playerid, trembot, 0); //Colocar o NPC dentro do veнculo que criamos para isso.
SetPlayerSkin(playerid, 61);
}
if(!strcmp(npcname, "bot_onibus", true))//ONIBUS BOT
{
PutPlayerInVehicle(playerid, NPCBus, 0);
SetPlayerSkin(playerid, 61);
}
return 1;
}