SetPlayerHoldingObject - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerHoldingObject (
/showthread.php?tid=179116)
SetPlayerHoldingObject -
Hamza' - 25.09.2010
Well, All I want is one of you copy and paste or make the command Which let me use the /spho [modelid] [bone] In Game
The help would be appreciated..
Exemple
/spho 1609 2 it just attach a turtle to the playerid's head in game.
Re: SetPlayerHoldingObject -
CyNiC - 25.09.2010
pawn Код:
if(strcmp("/spho",cmdtext,true) == 0)
{
SetPlayerHoldingObject(playerid,1609,2);
return 1;
}
Re: SetPlayerHoldingObject -
Hamza' - 25.09.2010
Nah, I meant I want to write
/spho [AnyobjectID] [AnyBone]
in game..
understood ?
Re: SetPlayerHoldingObject -
Virtual1ty - 25.09.2010
This is an example using
zcmd +
sscanf2:
pawn Код:
COMMAND:spho(playerid, params[])
{
new
giveplayerid,
b1, b2;
if(sscanf(params, "udd", giveplayerid, b1, b2)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /spho [playerid/PartOfName] [modelid] [bone]");
if(giveplayerid != INVALID_PLAYER_ID)
{
SetPlayerHoldingObject(giveplayerid, b1, b2);
SendClientMessage(playerid, COLOR_WHITE, "Object successfully attached!");
}
return true;
}
Re: SetPlayerHoldingObject -
Hamza' - 25.09.2010
Quote:
Originally Posted by Virtual1ty
|
Can't you give me in normal way,
Re: SetPlayerHoldingObject -
Mike_Peterson - 25.09.2010
dcmd_ and zcmd + sscanf are easiest
else u need to make strtok, strlen and all that shit :P