Originally Posted by PauloCPB
Olб preciso de ajuda com isto aqui, quando o Player vai Preso e Morre na cadeia ou й morto por um cop ele nгo vai para Prisгo olha aqui os codes.
No On Player Spawn o code de Ir para o hospital:
pawn Код:
if(Morreu[playerid]) { SetPlayerHealth(playerid, 100.0); SetPlayerPos(playerid , 1172.5526, -1323.2614, 15.4028); SetPlayerFacingAngle(playerid , 270); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); Controle(playerid,0); GameTextForPlayer(playerid, "~r~Voce Foi Parar No~n~Hospital...", 4000, 4); return 1; }
O de quando o Player Se Recupera:
pawn Код:
forward RecuperouSe(); public RecuperouSe() { for(new p = 0; p < MAX_PLAYERS; p++) { if(Morreu[p]) { TempoHospital[p]++; new Float:vida; GetPlayerHealth(p, vida); switch(TempoHospital[p]) { case 1 .. 59: { SetPlayerHealth(p, vida+1); } case 60: { Morreu[p] = false; SetPlayerPos(p , 1172.5526, -1323.2614, 15.4028); SetPlayerFacingAngle(p , 270); SetCameraBehindPlayer(p ); TempoHospital[p] = 0; Controle(p, 1); } } } } return 1; }
quando й Morto й morto por um cop:
pawn Код:
new price = WantedPoints[playerid] * 100; if(PlayerInfo[killerid][pMembro] == 1 || PlayerInfo[killerid][pLider] == 1) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 1; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Militar, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 2 || PlayerInfo[killerid][pLider] == 2) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 3; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na HQ ROTA, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 7; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos no Exйrcito, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 16 || PlayerInfo[killerid][pLider] == 16) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 4; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Civil, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } if(PlayerInfo[killerid][pMembro] == 11 || PlayerInfo[killerid][pLider] == 11) { format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price); GameTextForPlayer(killerid, gstring, 5000, 1); ConsumingMoney[killerid] = 1; GivePlayerMoney(killerid, price / 2); PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0); GivePlayerMoney(playerid, - price); PlayerInfo[playerid][pJailed] = 5; PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180); format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Federal, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price); SendClientMessage(playerid, COLOR_LIGHTRED, gstring); WantedPoints[playerid] = 0; SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pDrogas] = 0; PlayerInfo[playerid][pDrogas2] = 0; PlayerInfo[playerid][pDrogas3] = 0; PlayerInfo[playerid][pMats] = 0; } //} }
Quando morre na cedeia:
pawn Код:
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_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } if(PlayerInfo[playerid][pJailed] == 2) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,268.5777,1857.9351,9.8133); SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811 return true; } if(PlayerInfo[playerid][pJailed] == 9) { SetPlayerInterior(playerid, 18); SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);//SetPlayerPos(playerid,1175.6014,-1179.9524,87.0427); //SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811 SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Cadeia!"); return true; } if(PlayerInfo[playerid][pJailed] == 3) { SetPlayerInterior(playerid, 10); rand = random(sizeof(gPresoBopeSpawns)); SetPlayerPos(playerid, gPresoBopeSpawns[rand][0], gPresoBopeSpawns[rand][1], gPresoBopeSpawns[rand][2]); // Warp the player SetPlayerFacingAngle(playerid, gPresoBopeSpawns[rand][3]); SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } 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_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } 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_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } if(PlayerInfo[playerid][pJailed] == 6) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2695.6262,-2126.2393,13.5488); SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } if(PlayerInfo[playerid][pJailed] == 7) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,-1293.2203,490.5885,11.1953); SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; } if(PlayerInfo[playerid][pJailed] == 8) { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid,264.4160,87.2363,1001.0391); SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo"); return true; }
|