#1

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,1480.9829,-1769.9470,18.795)
{
SetPlayerPos(playerid,388.8720,173.8050,1008.382 ;
return 1;
} //other enter commands go here if(player......
}
if (strcmp("/exit", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173 .8050,1008.382)
{
SetPlayerPos(playerid,1480.9829,-1769.9470,18.795;
return 1;
} //other exit commands go here if(player......
}
}

Im Using ZCMD but i want this to work but this command gives me a warning can you help me please?

Quote:

warning 209: function "zcmd_OnPlayerCommandText" should return a value

This Line that the warning shows is the last } at the end
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/enter", cmdtext, true, 6) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,1480.9829,-1769.9470,18.795)
        {
            SetPlayerPos(playerid,388.8720,173.8050,1008.382 ;
            return 1;
        } //other enter commands go here if(player......
    }
    if (strcmp("/exit", cmdtext, true, 6) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173 .8050,1008.382)
        {
            SetPlayerPos(playerid,1480.9829,-1769.9470,18.795;
            return 1;
        } //other exit commands go here if(player......
    }
    return 1;
}
Also, those commands are not written in Zcmd...
So you're not really using ZCMD at all.

This is how it would look in ZCMD
pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1480.9829,-1769.9470,18.795)
    {
        SetPlayerPos(playerid,388.8720,173.8050,1008.382 ;
        return 1;
    } //other enter commands go here if(player......
    return 1;
}
CMD:exit(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173 .8050,1008.382)
    {
        SetPlayerPos(playerid,1480.9829,-1769.9470,18.795;
        return 1;
    } //other exit commands go here if(player......
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)