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=585075)
Pickup Problem -
Hemeei - 10.08.2015
i dont know what to do!
when the player pickup the shop , the player is teleporting to the ground
here's the image
Re: Pickup Problem -
SoFahim - 10.08.2015
Where is the picture?
Re: Pickup Problem -
Hemeei - 10.08.2015
Re: Pickup Problem -
SoFahim - 10.08.2015
Show the Pickup code
Re: Pickup Problem -
Hemeei - 10.08.2015
Quote:
Originally Posted by SoFahim
Show the Pickup code
|
PHP код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i; i != sizeof(gShop); i++)
{
if(pickupid == gShop[i][SHOP_PICKUP])
{
if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot pickup this right now.");
if( gShop[i][SHOP_TEAM] != NO_TEAM &&
GetPlayerTeam(playerid) != gShop[i][SHOP_TEAM])
{
return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't open enemies' shop!");
}
//dialog check
if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
return ShowPlayerShopDialog(playerid);
}
}
return 1;
}
ShowPlayerShopDialog(playerid)
{
new dialogstr[556];
strcat(dialogstr, ""SAMP_BLUE"Full Health ($2500)\n");
strcat(dialogstr, ""SAMP_BLUE"Full Armour ($2500)\n");
strcat(dialogstr, ""CORAL"- Weapons List\n");
strcat(dialogstr, ""CORAL"- Misc. Items\n");
strcat(dialogstr, ""CORAL"- Inventory Items");
return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_LIST, "Shop!", dialogstr, "Select", "Close");
}
Re: Pickup Problem -
SoFahim - 10.08.2015
Quote:
Originally Posted by Hemeei
PHP код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i; i != sizeof(gShop); i++)
{
if(pickupid == gShop[i][SHOP_PICKUP])
{
if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot pickup this right now.");
if( gShop[i][SHOP_TEAM] != NO_TEAM &&
GetPlayerTeam(playerid) != gShop[i][SHOP_TEAM])
{
return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't open enemies' shop!");
}
//dialog check
if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
return ShowPlayerShopDialog(playerid);
}
}
return 1;
}
ShowPlayerShopDialog(playerid)
{
new dialogstr[556];
strcat(dialogstr, ""SAMP_BLUE"Full Health ($2500)\n");
strcat(dialogstr, ""SAMP_BLUE"Full Armour ($2500)\n");
strcat(dialogstr, ""CORAL"- Weapons List\n");
strcat(dialogstr, ""CORAL"- Misc. Items\n");
strcat(dialogstr, ""CORAL"- Inventory Items");
return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_LIST, "Shop!", dialogstr, "Select", "Close");
}
|
Try with no interior
Re: Pickup Problem -
Hemeei - 10.08.2015
Quote:
Originally Posted by SoFahim
Try with no interior
|
did you change something ?
Re: Pickup Problem -
SoFahim - 10.08.2015
No. I din't . just try to put that pickup in a normal place. Not in interior
Re: Pickup Problem -
valych - 10.08.2015
Most likely (if coordinates of teleportation point are right), objects of your interior can't manage to load for player in time which causes him to fall down. Try to set Z coordinate to "Z_value + 1" (or even 2) in SetPlayerPos function.
In case if you cant even see objects of your interior, check whether they are created and then double check the correctness of coordinates where a player is to be teleported to.
Re: Pickup Problem -
jamesmith12 - 11.08.2015
why not make a shop? when he pickup he gonna teleport to the ground make shop on the ground then when he gonna Go , you gonna teleport him again to the building