A problem with latest version of streamer
#1

I have installed the latest streamer version, and i have a problem about pickups.

I have a war system and when a player die, in his position i create 2 pickups: 1 for health and 1 for player's gun .
The problem is that the pickups aren't created and i don't know why..
I have this code in onplayerdeath, see here:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        SendClientMessage(playerid, -1, "You have been killed by another player!");
        new Float:pos[3];
        GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
        pickup1[playerid] = CreateDynamicPickup(1241, 23, pos[0] + 2.0, pos[1] + 2.0, pos[2], 0, 0, INVALID_PLAYER_ID, 30.0);
        if(GetPlayerWeapon(playerid) == 24)
        {
            pickup2[playerid] = CreateDynamicPickup(348, 23, pos[0], pos[1], pos[2], 0, 0, INVALID_PLAYER_ID, 30.0);
            pickup2GUN[playerid] = 24;
        }  
    }
    return 1;
}
How can i fix this?
Reply
#2

you are using type that doesnt even exist
CreateDynamicPickup(348, 8, pos[0]+2.0, pos[1]+2.0, pos[2], .streamdistance=30.0);
Reply
#3

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
CreateDynamicPickup(348, 23, pos[0]+2.0, pos[1]+2.0, pos[2], .streamdistance=30.0);
And if I want to pickup to be created in vw 1337 not in 0?
Reply
#4

The syntax is:
PHP код:
CreateDynamicPickup(modelidtypeFloat:xFloat:yFloat:zworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_PICKUP_SDareaid = -1priority 0
PHP код:
CreateDynamicPickup(34823pos[0]+2.0pos[1]+2.0pos[2], 1337, .streamdistance=30.0); 
Reply
#5

new vw=GetPlayerVirtualWorld(playerid);
CreateDynamicPickup(348, 23, pos[0]+2.0, pos[1]+2.0, pos[2], .worldid=vw, .streamdistance=30.0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)