SetPlayerHoldingObject
#1

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.
Reply
#2

pawn Код:
if(strcmp("/spho",cmdtext,true) == 0)
{
    SetPlayerHoldingObject(playerid,1609,2);
    return 1;
}
Reply
#3

Nah, I meant I want to write

/spho [AnyobjectID] [AnyBone]

in game..

understood ?
Reply
#4

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;
}
Reply
#5

Quote:
Originally Posted by Virtual1ty
Посмотреть сообщение
This is an example using zcmd + sscanf2:
Can't you give me in normal way,
Reply
#6

dcmd_ and zcmd + sscanf are easiest
else u need to make strtok, strlen and all that shit :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)