12.08.2013, 00:48
Й sistema do GM Brasil Furia Style!
Me ajudem por favor, nгo entendo muito de pawno, sу o basico, por isso peguei gm pra editar
Codigo de quando morre:
Codigo de quando nasce(hospital):
Me ajudem por favor, nгo entendo muito de pawno, sу o basico, por isso peguei gm pra editar
Codigo de quando morre:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[playerid][pVIP] < 1 && SistemaHospital == 0 && 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, "Vocк serб internado no hospital.");
PlayerInfo[playerid][pTempoHospitalizado] = 90;
storeexit[playerid] = 4;
PlayerInfo[playerid][pHospitalID] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк serб internado no hospital.");
PlayerInfo[playerid][pTempoHospitalizado] = 90;
storeexit[playerid] = 5;
PlayerInfo[playerid][pHospitalID] = 2;
}
}
pawn Код:
public SetPlayerSpawn(playerid)
{
new rand;
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
if(sincronizando[playerid] == 1)
{
return 1;
}
if(PlayerInfo[playerid][pVIP] == 0 && PlayerInfo[playerid][pHospitalID] > 0 && SistemaHospital == 0)
{
if(PlayerInfo[playerid][pHospitalID] == 1)
{
GameTextForPlayer(playerid, "~r~Hospitalizado", 5000, 6);
TogglePlayerControllable(playerid, 0);
storeexit[playerid] = 5;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);
rand = random(sizeof(HospitalizadoSpawns));
SetPlayerPos(playerid, HospitalizadoSpawns[rand][0], HospitalizadoSpawns[rand][1], HospitalizadoSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, HospitalizadoSpawns[rand][3]);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,0,1,1,1,1);
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "Remedio do Hospital", "Os mйdicos lhe ofereceram um remйdio para vocк se recuperar\nVocк pode escolher entre pagar o remйdio e sair do Hospital\nOu continuar no Hospital atй se recuperar dos ferimentos\n\nCusto do remйdio: R$50", "Aceitar", "Recusar");
return true;
}
else if(PlayerInfo[playerid][pHospitalID] == 2)
{
GameTextForPlayer(playerid, "~r~Hospitalizado", 5000, 6);
TogglePlayerControllable(playerid, 0);
SetPlayerInterior(playerid, 10);
storeexit[playerid] = 4;
rand = random(sizeof(HospitalizadoSpawns));
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, HospitalizadoSpawns[rand][0], HospitalizadoSpawns[rand][1], HospitalizadoSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, HospitalizadoSpawns[rand][3]);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,0,1,1,1,1);
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "Remedio do Hospital", "Os mйdicos lhe ofereceram um remйdio para vocк se recuperar\nVocк pode escolher entre pagar o remйdio e sair do Hospital\nOu continuar no Hospital atй se recuperar dos ferimentos\n\nCusto do remйdio: R$50", "Aceitar", "Recusar");
return true;
}
return true;
}
if(MedicBill[playerid] >= 2 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
if(PlayerInfo[playerid][pVIP] < 1 && PlayerInfo[playerid][pSocio] >= 1)
{
format(gstring, 128, "Hospital: Vocк foi recuperado e perdeu R$%d.", precomorte);
SendClientMessage(playerid, TEAM_CYAN_COLOR, gstring);
GivePlayerMoney(playerid, -precomorte);
}
SBizzInfo[12][sbTill] += precomorte;
ExtortionSBiz(12, precomorte);
ResetPlayerWeaponsEx(playerid);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
BancoDasOrgs[4][Dinheiro] += precomorte;
if(WantedPoints[playerid] > 0)
{
new wanted = WantedPoints[playerid];
new diecash = WantedPoints[playerid]*600;
format(gstring, sizeof(gstring), "Vocк perdeu R$%d por morrer com nivel de procura: %d.", diecash, wanted);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
GivePlayerMoney(playerid, - diecash);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
}
}
if(PlayerInfo[playerid][pVIP] > 0) { SetPlayerHealth(playerid, 100.0); }
else { SetPlayerHealth(playerid, 100.0+PlayerInfo[playerid][pSHealth]); }
if(PlayerInfo[playerid][pSocio] > 0) { SetPlayerHealth(playerid, 100.0); }
else { SetPlayerHealth(playerid, 100.0+PlayerInfo[playerid][pSHealth]); }
spawnado[playerid] = 1;
MedicBill[playerid] ++;
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pTut] == 0)
{
gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
ClearChatbox(playerid, 8);
SetPlayerVirtualWorld(playerid,playerid+1);
SetPlayerCameraPos(playerid,2317.0042,2352.8259,17.7403);
SetPlayerPos(playerid,2317.0042,2352.8259,17.7403);
SetPlayerSkin(playerid, 83);
SendClientMessage(playerid, COLOR_GREEN, "Seja bem-vindo(a) ao Over RPG");
ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Etapa: Registro","Escolha seu sexo\nVocк й Homem ou Mulher","Homem","Mulher");
PlayerPlaySound(playerid, 1131, 0.0, 0.0, 0.0);
}
new House = PlayerInfo[playerid][pPHousekey];
if(PlayerPaintballing[playerid] != 0)
{
ResetPlayerWeaponsEx(playerid);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 25, 999);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid, 10);
PlayerInfo[playerid][pInt] = 10;
rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
return 1;
}
if(PlayerInfo[playerid][pLuta] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(PlayerInfo[playerid][pLuta] == 2)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(PlayerInfo[playerid][pLuta] == 3)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
if(PlayerInfo[playerid][pLuta] == 4)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(PlayerInfo[playerid][pLuta] == 5)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(PlayerInfo[playerid][pLuta] == 6)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(PlayerInfo[playerid][pJailed] == 1)
{
SetPlayerInterior(playerid, 6);
rand = random(sizeof(gPresoPmSpawns));
SetPlayerPos(playerid, gPresoPmSpawns[rand][0], gPresoPmSpawns[rand][1], gPresoPmSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gPresoPmSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
//SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
return 1;
}
if(PlayerInfo[playerid][pJailed] == 3)
{
SetPlayerInterior(playerid, 10);
rand = random(sizeof(gPresoRotaSpawns));
SetPlayerPos(playerid, gPresoRotaSpawns[rand][0], gPresoRotaSpawns[rand][1], gPresoRotaSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gPresoRotaSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
SetPlayerInterior(playerid, 3);
rand = random(sizeof(gPresoPcSpawns));
SetPlayerPos(playerid, gPresoPcSpawns[rand][0], gPresoPcSpawns[rand][1], gPresoPcSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gPresoPcSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 5)
{
SetPlayerInterior(playerid, 5);
rand = random(sizeof(gPresoPfSpawns));
SetPlayerPos(playerid, gPresoPfSpawns[rand][0], gPresoPfSpawns[rand][1], gPresoPfSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gPresoPfSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 6)
{
SetPlayerInterior(playerid,6);
SetPlayerVirtualWorld(playerid,6);
PlayerInfo[playerid][pInt] = 6;
rand = random(sizeof(gPresoadminSpawns));
SetPlayerPos(playerid,gPresoadminSpawns[rand][0], gPresoadminSpawns[rand][1], gPresoadminSpawns[rand][2]);//264.6288,77.5742,1001.0391,268.5763
SetPlayerFacingAngle(playerid, gPresoadminSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 7)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,-1293.2203,490.5885,11.1953);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 18)
{
SetPlayerInterior(playerid, 0);
rand = random(sizeof(gPresoPmSpawns));
SetPlayerPos(playerid, gPresoPmSpawns[rand][0], gPresoPmSpawns[rand][1], gPresoPmSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, gPresoPmSpawns[rand][3]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sentenзa incompleta,Vocк voltou para Prisгo");
return 1;
}