SA-MP Forums Archive
Error on ZCMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error on ZCMD (/showthread.php?tid=343132)



Error on ZCMD - Neil. - 16.05.2012

Edit: Fixed


Re: Error on ZCMD - Jonny5 - 16.05.2012

the command goes out side all other functions


Re: Error on ZCMD - Neil. - 16.05.2012

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
the command goes out side all other functions
So i will not use the OnPlayerCommandText function?


Re: Error on ZCMD - doreto - 16.05.2012

ZCMD include alone you to place your code were you wont into your gm/fs but not in callbacks/functions or other place

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;
}
CMD:detach(playerid, params[])
{
    new var0 = 0;
    var0 = GetPlayerVehicleID(playerid);
    DetachTrailerFromVehicle(var0);
    SendClientMessage(playerid, 0x00FF00FF, "Trailer Detached");
    return 1;
}



Re: Error on ZCMD - omario - 16.05.2012

put it out of OnPlayerCommandText



Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}  

CMD:detach(playerid, params[])
   {
        new var0 = 0;
        var0 = GetPlayerVehicleID(playerid);
        DetachTrailerFromVehicle(var0);
        SendClientMessage(playerid, 0x00FF00FF, "Trailer Detached");
        return 1;
    }