Please help me command
#1

pawn Код:
CMD:mycommandhere(playerid,params[])
{
    new Float:cz;
    new Float:cy;
    new Float:cx;
    new skin = GetPlayerSkin(playerid);
    GetPlayerPos(playerid,cx,cy,cz);
    object = CreateObject(skin, cx , cy , cz,   -12.30000, -87.30000, -1.56000);
    object1 = CreateObject(skin, cx , cy , cz,  -12.30000, -87.30000, -1.56000);
}
and when i going in game type /mycommandhere the server say : SERVER UNKNOW THAT COMMAND...
What problem ? i pawn compiler this
Reply
#2

return 1;

after object1 = ...
Reply
#3

pawn Код:
CMD:mycommandhere(playerid,params[])
{
    new Float:cz;
    new Float:cy;
    new Float:cx;
    new skin = GetPlayerSkin(playerid);
    GetPlayerPos(playerid,cx,cy,cz);
    object = CreateObject(skin, cx , cy , cz,   -12.30000, -87.30000, -1.56000);
    object1 = CreateObject(skin, cx , cy , cz,  -12.30000, -87.30000, -1.56000);
    return 1;//This
}
Also read this
Reply
#4

oh shit i forgot that thanks jake and dark rain
Reply
#5

hey but when i type the command i don't see the object. i want to put them next to me... the cx and cy should plus how much ?
Reply
#6

help please i'm very need this
Reply
#7

pawn Код:
CMD:mycommandhere(playerid,params[])
{
    new Float:cz;
    new Float:cy;
    new Float:cx;
    new skin = GetPlayerSkin(playerid);
    GetPlayerPos(playerid,cx,cy,cz);
    object = CreateObject(skin, cx , cy+1 , cz,   -12.30000, -87.30000, -1.56000);
    object1 = CreateObject(skin, cx , cy+1 , cz,  -12.30000, -87.30000, -1.56000);
    return 1;//This
}
Reply
#8

Quote:
Originally Posted by arjanforgames
Посмотреть сообщение
pawn Код:
CMD:mycommandhere(playerid,params[])
{
    new Float:cz;
    new Float:cy;
    new Float:cx;
    new skin = GetPlayerSkin(playerid);
    GetPlayerPos(playerid,cx,cy,cz);
    object = CreateObject(skin, cx , cy+1 , cz,   -12.30000, -87.30000, -1.56000);
    object1 = CreateObject(skin, cx , cy+1 , cz,  -12.30000, -87.30000, -1.56000);
    return 1;//This
}
cy + 1 ? this still doesn't work i don't see the object.
Reply
#9

Skins are not considered valid model objects. You are trying to create an object with same model of playerid's skin.
If you want to show a ped use an NPC, otherwise use a valid model in the first parameter.
Reply
#10

https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Maybe that's what you're looking for? Having the wrong object ID might also result in a non-existant (or too small/big to be visible) object being created.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)