A problem with latest version of streamer -
RedGun2015 - 08.06.2018
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?
Re: A problem with latest version of streamer -
CodeStyle175 - 08.06.2018
you are using type that doesnt even exist
CreateDynamicPickup(348, 8, pos[0]+2.0, pos[1]+2.0, pos[2], .streamdistance=30.0);
Re: A problem with latest version of streamer -
RedGun2015 - 08.06.2018
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?
Re: A problem with latest version of streamer -
Dayrion - 08.06.2018
The syntax is:
PHP код:
CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_PICKUP_SD, areaid = -1, priority = 0)
PHP код:
CreateDynamicPickup(348, 23, pos[0]+2.0, pos[1]+2.0, pos[2], 1337, .streamdistance=30.0);
Re: A problem with latest version of streamer -
CodeStyle175 - 08.06.2018
new vw=GetPlayerVirtualWorld(playerid);
CreateDynamicPickup(348, 23, pos[0]+2.0, pos[1]+2.0, pos[2], .worldid=vw, .streamdistance=30.0);