Pickup problem
#1

When a person pickup the pickup it disappears
What can I do to Make it doesn't disappear?
Reply
#2

https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/PickupTypes

Just use CreatePickup(model, 1, Float:X, Float:Y, Float:Z, Virtualworld);

When the the is 2 it does
Quote:
Originally Posted by Wiki
1Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY.
Reply
#3

sorry it's not helpful for me because I can't understand what can I do?
of course I used that function in ongamemodeinit :
Код:
        RP = CreatePickup(1239,2,-148.4453,1110.0249,19.7500, -1);
	AP = CreatePickup(1239,2,-797.5327,1556.2026,27.1244, -1);
	EP = CreatePickup(1239,2,1146.6642,1976.5652,10.8203, -1);
	A2P = CreatePickup(1239,2,385.2281,2474.4160,16.5000, -1);
	MP = CreatePickup(1239,2,-252.4021,2603.1230,62.8582, -1);
and made it on onplayerpickuppickup:
Код:
if(pickupid == RP && GetPlayerTeam(playerid) != TEAM_Egypt) return SendClientMessage(playerid, 0xFF0000AA, "Only Egypt team can use this Pickup.");
	{
    if(pickupid == RP) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pickup", "Health - 5000$\nArmour - 6000$\n\nWeapons\nDeathmatch stadium", "Buy", "Cancel");
    }
    if(pickupid == EP && GetPlayerTeam(playerid) != TEAM_Russia) return SendClientMessage(playerid, 0xFF0000AA, "Only Russia team can use this Pickup.");
	{
    if(pickupid == EP) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pickup", "Health - 5000$\nArmour - 6000$\n\nWeapons\nDeathmatch stadium", "Buy", "Cancel");
    }
    if(pickupid == AP && GetPlayerTeam(playerid) != TEAM_Australia) return SendClientMessage(playerid, 0xFF0000AA, "Only Australian team can use this Pickup.");
	{
    if(pickupid == AP) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pickup", "Health - 5000$\nArmour - 6000$\n\nWeapons\nDeathmatch stadium", "Buy", "Cancel");
    }
    if(pickupid == A2P && GetPlayerTeam(playerid) != TEAM_UK) return SendClientMessage(playerid, 0xFF0000AA, "Only UKn team can use this Pickup.");
	{
    if(pickupid == A2P) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pickup", "Health - 5000$\nArmour - 6000$\n\nWeapons\nDeathmatch stadium", "Buy", "Cancel");
    }
    if(pickupid == MP && GetPlayerTeam(playerid) != TEAM_USA) return SendClientMessage(playerid, 0xFF0000AA, "Only USA team can use this Pickup.");
	{
    if(pickupid == MP) ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Pickup", "Health - 5000$\nArmour - 6000$\n\nWeapons\nDeathmatch stadium", "Buy", "Cancel");
    }
Reply
#4

Quote:

RP = CreatePickup(1239,1,-148.4453,1110.0249,19.7500, -1);
AP = CreatePickup(1239,1,-797.5327,1556.2026,27.1244, -1);
EP = CreatePickup(1239,1,1146.6642,1976.5652,10.8203, -1);
A2P = CreatePickup(1239,1,385.2281,2474.4160,16.5000, -1);
MP = CreatePickup(1239,1,-252.4021,2603.1230,62.8582, -1);

Use this! Your welcome!
Reply
#5

Use What?
Reply
#6

RP = CreatePickup(1239,1,-148.4453,1110.0249,19.7500, -1);
AP = CreatePickup(1239,1,-797.5327,1556.2026,27.1244, -1);
EP = CreatePickup(1239,1,1146.6642,1976.5652,10.8203, -1);
A2P = CreatePickup(1239,1,385.2281,2474.4160,16.5000, -1);
MP = CreatePickup(1239,1,-252.4021,2603.1230,62.8582, -1);




replace the current code with this

Sorry to not be more detailed, on my phone..
Reply
#7

Crayder REP+ but can you tell me what is the difference ??
Reply
#8

Quote:
Originally Posted by AhmedMohamed
Посмотреть сообщение
Crayder REP+ but can you tell me what is the difference ??
He has changed the pickups spawn type, have a look at this:
https://sampwiki.blast.hk/wiki/PickupTypes
Reply
#9

RP = CreatePickup(1239,2,-148.4453,1110.0249,19.7500, -1);
AP = CreatePickup(1239,2,-797.5327,1556.2026,27.1244, -1);
EP = CreatePickup(1239,2,1146.6642,1976.5652,10.8203, -1);
A2P = CreatePickup(1239,2,385.2281,2474.4160,16.5000, -1);
MP = CreatePickup(1239,2,-252.4021,2603.1230,62.8582, -1);


YOur second perimeter is the style, in your original(above) the style is set to 2, which disappears and respawns after some time... if you set it to 1, it will be able to be picked up, but will still be there, not disappearing at all...
Reply
#10

https://sampwiki.blast.hk/wiki/PickupTypes refer to this url to see the other "types"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)