09.09.2016, 07:47
So I wanted to create the command [/ff], that teleports your character 20 meters in front of him. But when I compile it gives me 3 warnings and the command works in-game.
This is the command,
And this is the screenshot with the errors:http://imgur.com/a/7tfQF
This is the command,
Код:
CMD:ff(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) { new Float:px, Float:py, Float:pz, Float:pa; GetPlayerFacingAngle(playerid, pa); if(pa >= 0.0 && pa <= 22.5) // { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px, py+20, pz); } if(pa >= 332.5 && pa < 0.0) //n2 { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px, py+20, pz); } if(pa >= 22.5 && pa <= 67.5) //nw { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px-10, py+10, pz); } if(pa >= 67.5 && pa <= 112.5) //w { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px-20, py, pz); } if(pa >= 112.5 && pa <= 157.5) //sw { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px-10, py-10, pz); } if(pa >= 157.5 && pa <= 202.5) //s { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px, py-20, pz); } if(pa >= 202.5 && pa <= 247.5)//se { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px+10, py-10, pz); } if(pa >= 247.5 && pa <= 292.5)//e { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px+20, py, pz); } if(pa >= 292.5 && pa <= 332.5)//e { GetPlayerPos(playerid, px, py, pz); SetPlayerPos(playerid, px+10, py+10, pz); } return 1; } } return 1; }