[HELP] SetPlayerAttachedObject Problem
#1

Yea, So i added a command which will get a neon tube on your player,So when he sits in the car, It shows the neon light down of your car, but the problem is, When i sit in the car, It doesnt show the Neon Light, But the player is still holding, And when i type /neon in the car again, The neon light just blinks once. Can anyone help me fix this problem please?
Reply
#2

We cant help you without the code.
Reply
#3

here is the code :
Код:
    if(strcmp(cmd, "/neon", true) == 0) {
		 SetPlayerAttachedObject(playerid, 3, 18649,3,0.1,0.1,-0.1,0.0,270.0,0.0);
         return 1;
    }
Reply
#4

Hmm, Let me get this straight? Do you want so people can get neon inside their car?

Why dont use AttachObjectToVehicle

EDIT: Oh now i get it after seeing your code.

NVM then
Reply
#5

Код:
if(strcmp(cmd, "/neon", true) == 0) {
		 AttachObjectToVehicle(playerid, 18649,3,0.1,0.1,-0.1,0.0,270.0,0.0);
         return 1;
    }
Warning :
Код:
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29853) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          10888 bytes
Code size:          1679764 bytes
Data size:         10383536 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4473 cells (17892 bytes)
Total requirements:12090572 bytes

1 Warning.
Reply
#6

Look at samp wiki how to do it. Click me And you will see how you should do.
Reply
#7

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
Look at samp wiki how to do it. Click me And you will see how you should do.
Can you provide the complete code please?
Reply
#8

pawn Код:
new objectid = CreateObject(18649, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.1,0.1,-0.1,0.0,270.0,0.0);
Reply
#9

Now What?
Код:
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29853) : error 003: declaration of a local variable must appear in a compound block
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29853) : error 017: undefined symbol "objectid"
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29854) : error 017: undefined symbol "objectid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#10

Quote:
Originally Posted by Sid_Alexander
Посмотреть сообщение
Now What?
Код:
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29853) : error 003: declaration of a local variable must appear in a compound block
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29853) : error 017: undefined symbol "objectid"
D:\Games\Desktop\Overseas RolePlay\gamemodes\OSRP.pwn(29854) : error 017: undefined symbol "objectid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Do you have it like this?

pawn Код:
if(strcmp(cmd, "/neon", true) == 0) {
    new objectid = CreateObject(18649, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.1,0.1,-0.1,0.0,270.0,0.0);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)