10.08.2015, 16:34
i dont know what to do!
when the player pickup the shop , the player is teleporting to the ground
here's the image


here's the image
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");
}
PHP код:
|