Object
#1

This is toy editor and i want to add it into my gamemode. Where in my gamemode i going to add that and can someone add that to ZCMD?

Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerAttachedObject(playerid, 0, 1337, 2);
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/edit", true))
    {
        EditAttachedObject(playerid, 0);
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You now edit your attached object on index slot 0!");
        return 1;
    }
    return 0;
}
Reply
#2

I think just this needs to change. Remove the public OnPlayerCommandText...

pawn Код:
CMD:edit(playerid,params[])
{
    EditAttachedObject(playerid, 0);
    SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You now edit your attached object on index slot 0!");
    return 1;
}
Reply
#3

And put it outside OnPlayerCommandText, it should be outside any callback.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)