SA-MP Forums Archive
Pickup problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pickup problem (/showthread.php?tid=497488)



Pickup problem - AhmedMohamed - 27.02.2014

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


Re: Pickup problem - MattTucker - 27.02.2014

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.



Re: Pickup problem - AhmedMohamed - 27.02.2014

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");
    }



Re: Pickup problem - Crayder - 27.02.2014

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!


Re: Pickup problem - AhmedMohamed - 27.02.2014

Use What?


Re: Pickup problem - Crayder - 27.02.2014

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..


Re: Pickup problem - AhmedMohamed - 27.02.2014

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


Re: Pickup problem - Lidor124 - 27.02.2014

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


Re: Pickup problem - Crayder - 27.02.2014

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...


Re: Pickup problem - Crayder - 27.02.2014

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