跳至主要内容

SetPickupForPlayer

注意

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

注意

This function has not yet been implemented.

Description

Adjusts the pickup model, type, and position for a specific player.

NameDescription
playeridThe ID of the player.
pickupidThe ID of the pickup.
modelThe model to set.
typeThe pickup type to set.
Float:xThe x coordinate to set the pickup at.
Float:yThe y coordinate to set the pickup at.
Float:zThe z coordinate to set the pickup at.

Returns

This function always returns true.

Examples

new g_Pickup;

public OnGameModeInit()
{
g_Pickup = CreatePickup(1239, 1, 1686.6160, 1455.4277, 10.7705, -1);
return 1;
}

public OnPlayerSpawn(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPickupForPlayer(playerid, g_Pickup, 1210, 2, x + 2.0, y + 2.0, z);
return 1;
}