[Ajuda] Relуgio trava quando entra no veнculo.
#1

Preciso de ajuda, й somente no servidor que o relogio trava, nгo sei se tem a ver com a GM.


public OnPlayerEnterVehicle:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[256];
    new strong[256];
    if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
 {
  if(IsPlayerAdmin(playerid)) { }
  else
  {
   new Float:cx, Float:cy, Float:cz;
     GetPlayerPos(playerid, cx, cy, cz);
      SetPlayerPos(playerid, cx, cy, cz);
      GetPlayerName(playerid, sendernome, sizeof(sendernome));
   format(strong, sizeof(strong), "* %s Puxa a maзaneta do veнculo de %s sem sucesso.", sendernome, CarInfo[vehicleid][cOwner]);
   ProxDetector(5.0, playerid, strong, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
   SendClientMessage(playerid, COLOR_WHITE, "[INFO]: Este veнculo estб trancado!");
  }
 }
 if(CarInfo[vehicleid][cLock] == 0)
 {
 GetPlayerName(playerid, sendername, sizeof(sendername));
 format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
 ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
 }
  if(Trancado[vehicleid] >= 1)
 {
     if(PlayerInfo[playerid][pAdmin] > 0 || ispassenger) { }
  else
  {
         new Float:x,Float:y,Float:z,Float:a;
      GetPlayerPos(playerid,x,y,z);
      GetPlayerFacingAngle(playerid,a);
       SetPlayerPos(playerid, x, y, z+0.3);
   SetPlayerFacingAngle(playerid, a);
       SendClientMessage(playerid, COLOR_YELLOW, "Veiculo Trancado!");
      }
 }
Obrigado desde jб.
Reply
#2

tenta otimizar mais esse code, porem creio que o problema n ta ae, mas sim no proprio sistema de relogio.
Reply
#3

Quote:
Originally Posted by PT
Посмотреть сообщение
tenta otimizar mais esse code, porem creio que o problema n ta ae, mas sim no proprio sistema de relogio.
Obrigado, irei ver.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)