SetPlayerAttachedObject
#1

Hello!
how to remove SetPlayerAttachedObject ? if i use a cmd then the player will get some objects in their hands but to remove it ,players should do /kill.How to make a remove cmd?
Reply
#2

pawn Code:
if(IsPlayerAttachedObjectSlotUsed(playerid,index)) RemovePlayerAttachedObject(playerid,index);
playerid - ID of the player you want to remove the object from.
index - index of the object.
Reply
#3

pawn Code:
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\gamemodes\SATDM_Lux.pwn(27088) : error 017: undefined symbol "index"
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\gamemodes\SATDM_Lux.pwn(27088) : error 017: undefined symbol "index"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
But it shows these errors
Reply
#4

And the object is not removing completely
Reply
#5

You must replace
Code:
index
with the object's index, for example you got:
pawn Code:
SetPlayerAttachedObject(playerid, 2, ...blabla);
so the INDEX is 2, then you must go:
pawn Code:
if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
Reply
#6

i got total 6 cmds and different objects, so how can i do that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)