26.05.2016, 19:07
Quote:
Try this :
PHP код:
|
Every command should always have return a value at the end, otherwise you will get the "unreachable code" warning.
To the OP:
Your command is not readable:
Код:
CMD:dropgps(playerid,params[]) { new Float:fPos[3]; if(pInfo[playerid][pLogged] == 0) return SendClientMessage(playerid, -1, "*"COL_RED" You're not loggedin!"); if(pInfo[playerid][pUsedGPS] == 0) return SendClientMessage(playerid, -1, "*"COL_RED" You're not used your 'GPS'!"); GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]); DayZSA_CreateLootsFunction("GPS", fPos[0]+random(2), fPos[1]+random(2), fPos[2]); pInfo[playerid][pUsedGPS] = 0; for (new i = 0; i < 6; i++) { //TextDrawShowForPlayer(playerid, MapTD[i]); } PlayerTextDrawShow(playerid, blockMap[playerid]); GangZoneShowForPlayer(playerid, BlockMap, 0x000000FF); SendClientMessage(playerid, -1, "*"COL_RED" You have dropped your 'GPS'!"); print("message passed"); return 1; }