Object help!
#1

1.how can i add object to attach on my body? like toys?
2. how can i make a gate thats is moving? /gate ?

thats all thanks!
Reply
#2

1.AttachObjectToPlayer
Reply
#3

2.http://forum.sa-mp.com/showthread.ph...ght=move+gates
Reply
#4

i tried the moveing gate script but i still got 2 errors
#include <a_samp>

new aGate;

public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(969,2482.2783,-1688.2960,13.5078,175.3654,0.00000000,0.00000000,9 0.00000000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,175.3654,2);//This will move the gate
return 1;
}
if(strcmp ("/closegate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,175.3654,2);//This will move the gate back to the old position
return 1;
}

return 0;
}

C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate1.pwn(17) : warning 202: number of arguments does not match definition
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate1.pwn(22) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

this is the location that i /save AddPlayerClass(294,2482.2783,-1688.2960,13.5078,175.3654,0,0,0,0,0,0); //
and the gate object id is 969
Reply
#5

pawn Код:
#include <a_samp>

new aGate;

public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(969,2482.2783,-1688.2960,13.5078,175.3654,0.00000000,0.00000000,9 0.00000000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate
return 1;
}
if(strcmp ("/closegate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate back to the old position
return 1;
}

return 0;
}
Here you go. And next time put your code in [ code ] Your code [ /code ]

And yeah, the gate will not move because you haven't put your coordinates where the gate should go to.
Reply
#6

Quote:
Originally Posted by Steve M.
Посмотреть сообщение
pawn Код:
#include <a_samp>

new aGate;

public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(969,2482.2783,-1688.2960,13.5078,175.3654,0.00000000,0.00000000,9 0.00000000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate
return 1;
}
if(strcmp ("/closegate", cmdtext, true) == 0)
{
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate back to the old position
return 1;
}

return 0;
}
Here you go. And next time put your code in [ code ] Your code [ /code ]

And yeah, the gate will not move because you haven't put your coordinates where the gate should go to.
i still got this 4 error
Код:
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate2.pwn(13) : error 001: expected token: ",", but found "-rational value-"
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate2.pwn(13) : warning 215: expression has no effect
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate2.pwn(13) : error 001: expected token: ";", but found ")"
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate2.pwn(13) : error 029: invalid expression, assumed zero
C:\Users\Kyle\Desktop\server1\Raven's Roleplay 0.3c\filterscripts\gate2.pwn(13) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#7

Код:
#include <a_samp>

new aGate;

public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(969,2482.2783,-1688.2960,13.5078,175.3654,0.00000000,0.00000000,9 0.00000000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
}
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate
return 1;
{
if(strcmp ("/closegate", cmdtext, true) == 0)
}
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate back to the old position
return 1;
}

return 0;
}
Reply
#8

Quote:
Originally Posted by Skidmarks
Посмотреть сообщение
Код:
#include <a_samp>

new aGate;

public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(969,2482.2783,-1688.2960,13.5078,175.3654,0.00000000,0.00000000,9 0.00000000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
}
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate
return 1;
{
if(strcmp ("/closegate", cmdtext, true) == 0)
}
MoveObject(aGate, 2482.2783,-1688.2960,13.5078,2);//This will move the gate back to the old position
return 1;
}

return 0;
}
i really still get the error im doing it on a filterscript, what i do is open pawno and press new and delete all what written paste this code is that right? or im wrong? ill add it to ravens roleplay game mode
Reply
#9

any feedback or help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)