Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.99 KB | None | 0 0
  1. RunPlayerChecks(playerid)
  2. {
  3.     new Float:x, Float:y, Float:z;
  4.     GetPlayerPos(playerid, x, y, z);
  5.     if (floatabs(x) >= 10000.0 || floatabs(y) >= 10000.0 || floatabs(z) >= 10000.0)
  6.         printf("[error][GetPlayerPos] %.1f, %.1f, %.1f", x, y, z);
  7.  
  8.     new Float:ang;
  9.     GetPlayerFacingAngle(playerid, ang);
  10.     if (ang < 0.0 || ang > 360.0)
  11.         printf("[error][GetPlayerFacingAngle] %.1f", ang);
  12.  
  13.     new i = GetPlayerInterior(playerid);
  14.     if (i < 0 || i > 18)
  15.         printf("[error][GetPlayerInterior] %d", i);
  16.  
  17.     new Float:health;
  18.     GetPlayerHealth(playerid, health);
  19.     if (health < 0.0 || health > 100.0)
  20.         printf("[error][GetPlayerHealth] %.1f", health);
  21.  
  22.     new Float:armour;
  23.     GetPlayerHealth(playerid, armour);
  24.     if (armour < 0.0 || armour > 100.0)
  25.         printf("[error][GetPlayerArmour] %.1f", armour);
  26.  
  27.     new ammo = GetPlayerAmmo(playerid);
  28.     if (ammo < 0 || ammo > 32767)
  29.         printf("[error][GetPlayerAmmo] %d", ammo);
  30.  
  31.     new wstate = GetPlayerWeaponState(playerid);
  32.     if (wstate < -1 || wstate > 3)
  33.         printf("[error][GetPlayerWeaponState] %d", wstate);
  34.  
  35.     new tplayer = GetPlayerTargetPlayer(playerid);
  36.     if ((tplayer < 0 || tplayer >= MAX_PLAYERS) && tplayer != INVALID_PLAYER_ID)
  37.         printf("[error][GetPlayerTargetPlayer] %d", tplayer);
  38.  
  39.     new tactor = GetPlayerTargetActor(playerid);
  40.     if ((tactor < 0 || tactor >= MAX_ACTORS) && tactor != INVALID_ACTOR_ID)
  41.         printf("[error][GetPlayerTargetActor] %d", tactor);
  42.  
  43.     new team = GetPlayerTeam(playerid);
  44.     if (team < 1 || team > NO_TEAM)
  45.         printf("[error][GetPlayerTeam] %d", team);
  46.  
  47.     new skin = GetPlayerSkin(playerid);
  48.     if (skin < 0 || skin == 74 || skin > 311)
  49.         printf("[error][GetPlayerSkin] %d", skin);
  50.  
  51.     for (new s = 0, w, a; s < MAX_WEAPON_SLOTS; s++) {
  52.         GetPlayerWeaponData(playerid, s, w, a);
  53.         if (w < 0 || w == 19 || w == 20 || w == 21 || w > 46 || a < 0 || a > 32767)
  54.             printf("[error][GetPlayerWeaponData] %d %d %d", s, w, a);
  55.     }
  56.  
  57.     new weap = GetPlayerWeapon(playerid);
  58.     if (weap < 0 || weap == 19 || weap == 20 || weap == 21 || weap > 46)
  59.         printf("[error][GetPlayerWeapon] %d", weap);
  60.  
  61.     new wlevel = GetPlayerWantedLevel(playerid);
  62.     if (wlevel < 0 || wlevel > 6)
  63.         printf("[error][GetPlayerWantedLevel] %d", wlevel);
  64.  
  65.     new svid = GetPlayerSurfingVehicleID(playerid);
  66.     if ((svid < 1 || svid > MAX_VEHICLES) && svid != INVALID_VEHICLE_ID)
  67.         printf("[error][GetPlayerSurfingVehicleID] %d", svid);
  68.  
  69.     new soid = GetPlayerSurfingObjectID(playerid);
  70.     if ((soid < 0 || soid >= MAX_OBJECTS) && soid != INVALID_OBJECT_ID)
  71.         printf("[error][GetPlayerSurfingObjectID] %d", soid);
  72.  
  73.     new pvid = GetPlayerVehicleID(playerid);
  74.     if (pvid < 0 || pvid > MAX_VEHICLES)
  75.         printf("[error][GetPlayerVehicleID] %d", pvid);
  76.  
  77.     new pseat = GetPlayerVehicleSeat(playerid);
  78.     if (pseat < -1 || pseat > 8)
  79.         printf("[error][GetPlayerVehicleSeat] %d", pseat);
  80.  
  81.     new Float:cx, Float:cy, Float:cz;
  82.     GetPlayerCameraPos(playerid, x, y, z);
  83.     if (floatabs(cx) >= 10000.0 || floatabs(cy) >= 10000.0 || floatabs(cz) >= 10000.0)
  84.         printf("[error][GetPlayerCameraPos] %.1f, %.1f, %.1f", cx, cy, cz);
  85.  
  86.     new cto = GetPlayerCameraTargetObject(playerid);
  87.     if ((cto < 0 || cto >= MAX_OBJECTS) && cto != INVALID_OBJECT_ID)
  88.         printf("[error][GetPlayerCameraTargetObject] %d", cto);
  89.  
  90.     new ctv = GetPlayerCameraTargetVehicle(playerid);
  91.     if ((ctv < 1 || ctv > MAX_VEHICLES) && ctv != INVALID_VEHICLE_ID)
  92.         printf("[error][GetPlayerCameraTargetVehicle] %d", ctv);
  93.  
  94.     new ctp = GetPlayerCameraTargetPlayer(playerid);
  95.     if ((ctp < 0 || ctp >= MAX_PLAYERS) && ctp != INVALID_PLAYER_ID)
  96.         printf("[error][GetPlayerCameraTargetPlayer] %d", ctp);
  97.  
  98.     new cta = GetPlayerCameraTargetActor(playerid);
  99.     if ((cta < 0 || cta > MAX_ACTORS) && cta != INVALID_ACTOR_ID)
  100.         printf("[error][GetPlayerCameraTargetActor] %d", cta);
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement