Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //topo do mode:
- forward DeletarRampa(playerid, objectid);
- //OnplayerKeyStateChange:
- if((newkeys & 512))
- {
- if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 520)
- {
- new Float:x, Float:y, Float:z, Float:az, Float:distancia;
- GetPlayerPos(playerid, x, y, z);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), az);
- if(GetPlayerPing(playerid) <= 200)distancia = 10.0;
- else if(GetPlayerPing(playerid) > 200 && GetPlayerPing(playerid) < 1000)distancia = 15.0;
- else if(GetPlayerPing(playerid) >= 1000)distancia = 25.0;
- x = x + (distancia * floatsin(-az+5, degrees));
- y = y + (distancia * floatcos(-az+5, degrees));
- new rampa = CreatePlayerObject(playerid, 1245, x2, y2, z, 0, 0, az-90);
- SetTimerEx("DeletarRampa", GetPlayerPing(playerid)+1300, 0, "dd", playerid, rampa);
- }
- }
- //final do mode:
- public DeletarRampa(playerid, objectid)return DestroyPlayerObject(playerid, objectid);
Advertisement
Add Comment
Please, Sign In to add comment