Unknown command problem
#2

Change ur code into this..

PHP код:
     if(strcmp(cmdtext"/eat"true)==0)
    {
    for(new 
xx<placesx++) 
    {
    if(
IsPlayerInRangeOfPoint(playerid2.0,PlesI[x][EnterPos][0],PlesI[x][EnterPos][1d],PlesI[x][EnterPos][2]))
    {
     new 
msg[1200];
     
format(msg,sizeof(msg),"{0099FF}[>>]{FFFFFF} %s text!",PlesI[x][vietospav]);
     
SetPlayerMapIcon(playerid73PlesI[x][EnterPos][0],PlesI[x][EnterPos][1],PlesI[x][EnterPos][2], 60MAPICON_GLOBAL);
     }
        else return 
SendClientMessage(playerid0xFFFFFF"You're not in the correct place");
    }
    return 
1;
 } 
To understand what I've done.. I returned a client message to the player if he's not in the right place instead of returning 0, because returning 0 causes that the server sends you the unknown command error.
Reply


Messages In This Thread
Unknown command problem - by ,TomY' - 25.06.2018, 17:49
Re: Unknown command problem - by JasonRiggs - 25.06.2018, 18:26
Re: Unknown command problem - by Lokii - 25.06.2018, 18:43
Re: Unknown command problem - by Calisthenics - 25.06.2018, 18:51
Re: Unknown command problem - by JasonRiggs - 25.06.2018, 18:59
Re: Unknown command problem - by ,TomY' - 25.06.2018, 20:17

Forum Jump:


Users browsing this thread: 4 Guest(s)