toribio

toribio

Sep 2nd, 2008
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. //topo do mode:
  2. forward DeletarRampa(playerid, objectid);
  3.  
  4. //OnplayerKeyStateChange:
  5.     if((newkeys & 512))
  6.     {
  7.         if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 520)
  8.         {
  9.             new Float:x, Float:y, Float:z, Float:az, Float:distancia;
  10.             GetPlayerPos(playerid, x, y, z);
  11.             GetVehicleZAngle(GetPlayerVehicleID(playerid), az);
  12.             if(GetPlayerPing(playerid) <= 200)distancia = 10.0;
  13.             else if(GetPlayerPing(playerid) > 200 && GetPlayerPing(playerid) < 1000)distancia = 15.0;
  14.             else if(GetPlayerPing(playerid) >= 1000)distancia = 25.0;
  15.             x = x + (distancia * floatsin(-az+5, degrees));
  16.             y = y + (distancia * floatcos(-az+5, degrees));
  17.             new rampa = CreatePlayerObject(playerid, 1245, x2, y2, z, 0, 0, az-90);
  18.             SetTimerEx("DeletarRampa", GetPlayerPing(playerid)+1300, 0, "dd", playerid, rampa);
  19.         }
  20.     }
  21.  
  22. //final do mode:
  23. public DeletarRampa(playerid, objectid)return DestroyPlayerObject(playerid, objectid);
Advertisement
Add Comment
Please, Sign In to add comment