04.04.2018, 18:22
Quote:
Thank you so much. It worked perfectly.
But how can I check if the player hits the ground or not? By so, the player wouldn't be TPed to the world's middle if he shot at the sky. I tried: PHP код:
|
Код:
new AdminPayer[MAX_PLAYERS]; public OnPlayerConnect(playerid) { new path[256]; format(path,sizeof(path),"users/%s.ini",PlayerName(playerid)); AdminPayer[playerid] = dini_Int(path,"Admin Level"); return true; } public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(IsPlayerAdmin(playerid) || AdminPayer[playerid] >= 3) { if(plInfo[playerid][tpw] == true && weaponid == 25) { new Float:fOriginX, Float:fOriginY, Float:fOriginZ,Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ; GetPlayerLastShotVectors(playerid, fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ); SetPlayerPos(playerid, fHitPosX, fHitPosY, fHitPosZ + 3); } } return true; }