Guest User

Untitled

a guest
Nov 21st, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.06 KB | None | 0 0
  1. public DriftCounter(playerid)
  2. {
  3.     if((GetVehicleModel(GetPlayerVehicleID(playerid)) == 562);
  4.   {
  5.     for (new i; i != MAX_PLAYERS; i++) {
  6.     if(IsPlayerInAnyVehicle(i)) {
  7.     new vehicleid = GetPlayerVehicleID(i);
  8.     new Float:x, Float:y, Float:z;
  9.     GetVehicleVelocity(vehicleid, x, y, z);
  10.     new speed = floatround(floatsqroot(x*x+y*y+z*z)*200.0);
  11.     if(speed > 1.0) {
  12.     new radianos = floatround( atan2( y, x ) );
  13.     if(radianos > 400) radianos -= 400;
  14.     switch(radianos) {
  15.     case 090 .. 180: radianos -= 90;
  16.     case 181 .. 360: radianos += 90;
  17.     default: radianos += 270;}
  18.     static  Float: angle;
  19.     GetVehicleZAngle(vehicleid, angle);
  20.     radianos = floatround(floatabs(radianos - angle));
  21.     if(radianos > 180){
  22.     radianos = floatround(floatabs(radianos - 360));}
  23.     new key[3];
  24.     GetPlayerKeys(i, key[0], key[1], key[2]);
  25.     if( key[0] != 32 && speed > 10) {
  26.     if( radianos > 3 && ((radianos * speed) / 30)  < 300) {
  27.     DriftEarn(i, (radianos * speed) / 35 ) ;}}}}}
  28.     }
  29.     else
  30.     {
  31.      
  32.     }
  33.     return true;
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment