PHP код:
if((dialogid == BUYWEPSDIAMOND) && response)
{
if(PlayerInfo[playerid][pDonator] == 3)
{
ShowPlayerDialog(playerid, DONATORWEPSMENU, DIALOG_STYLE_LIST, "VIP Weapons", "Desert Eagle\nSPAS-12\nM4\nAK-47\nShotgun\nMP5\nSniper\nSilenced Pistol\nGolf Club\nBat\nDildo\nSword", "Select", "Cancel");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "You are not diamond donator.");
return 1;
}
}
if(dialogid == DONATORWEPSMENU)
{
if(!response) return 1;
switch( listitem )
{
case 0:
GivePlayerValidWeapon(playerid, 24, 60000);
case 1:
GivePlayerValidWeapon(playerid, 27, 60000);
case 2:
GivePlayerValidWeapon(playerid, 31, 60000);
case 3:
GivePlayerValidWeapon(playerid, 30, 60000);
case 4:
GivePlayerValidWeapon(playerid, 25, 60000);
case 5:
GivePlayerValidWeapon(playerid, 29, 60000);
case 6:
GivePlayerValidWeapon(playerid, 34, 60000);
case 7:
GivePlayerValidWeapon(playerid, 23, 60000);
case 8:
GivePlayerValidWeapon(playerid, 2, 60000);
case 9:
GivePlayerValidWeapon(playerid, 5, 60000);
case 10:
GivePlayerValidWeapon(playerid, 10, 60000);
case 11:
GivePlayerValidWeapon(playerid, 8, 60000);
}
}
if((dialogid == BUYTOYSDIAMOND) && response)
{
if(PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Diamond Donator");
new stringg[512];
for(new x;x<MAX_PLAYERTOYS;x++)
{
new name[24] = "None";
for(new i;i<sizeof(HoldingObjectsPlat);i++)
{
if(HoldingObjectsPlat[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
{
format(name, sizeof(name), "%s", HoldingObjectsPlat[i][holdingmodelname]);
}
}
for(new i;i<sizeof(HoldingObjectsAll);i++)
{
if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
{
format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
}
}
format(stringg, sizeof(stringg), "%s(%d) %s (Bone: %s)\n", stringg, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
}
ShowPlayerDialog(playerid, BUYTOYSDIAMOND2, DIALOG_STYLE_LIST, "Select a Slot", stringg, "Select", "Cancel");
}
if((dialogid == BUYTOYSDIAMOND2) && response)
{
if(PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Diamond Donator");
if(PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessageEx(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys");
slotselection[playerid] = listitem;
new stringg[5256];
for(new x;x<sizeof(HoldingObjectsPlat);x++)
{
format(stringg, sizeof(stringg), "%s%s ($%d)\n", stringg, HoldingObjectsPlat[x][holdingmodelname], HoldingObjectsPlat[x][holdingprice]);
}
ShowPlayerDialog(playerid, BUYTOYSDIAMOND3, DIALOG_STYLE_LIST, "Select an Item", stringg, "Buy", "Cancel");
}
if((dialogid == BUYTOYSDIAMOND3) && response)
{
if(PlayerInfo[playerid][pDonator] < 3) return SendClientMessageEx(playerid, COLOR_WHITE, "* You must be a Diamond Donator");
if(GetPlayerCash(playerid) < HoldingObjects[listitem][holdingprice])
{
SendClientMessageEx(playerid, COLOR_WHITE, "* You can't afford that!");
}
else
{
GivePlayerCash(playerid, -HoldingObjectsPlat[listitem][holdingprice]);
PlayerToyInfo[playerid][slotselection[playerid]][ptModelID] = HoldingObjectsPlat[listitem][holdingmodelid];
new modelid = PlayerToyInfo[playerid][slotselection[playerid]][ptModelID];
if((modelid >= 19317 && modelid <= 19318))
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid == 19472 || modelid == 19469)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid >= 19421 && modelid <= 19424)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid == 19352 || modelid >= 19350 && modelid <= 19351)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid == 19314 || modelid == 19315)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if((modelid >= 19006 && modelid <= 19035) || (modelid >= 19138 && modelid <= 19140))
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.9;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.35;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid >= 18891 && modelid <= 18910)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.15;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
}
else if(modelid >= 18926 && modelid <= 18935)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if(modelid >= 18911 && modelid <= 18920)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.1;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.035;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 90.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 90.0;
}
else if(modelid == 19078 || modelid == 19078)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 16;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 180.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else if((modelid >= 18641 && modelid <= 18644) || (modelid >= 19080 && modelid <= 19084) || modelid == 18890)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 6;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
else
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = 2;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = 0.0;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = 0.0;
}
format(string, sizeof(string), "* You have purchased %s for $%d (Slot: %d)", HoldingObjectsPlat[listitem][holdingmodelname], HoldingObjectsPlat[listitem][holdingprice], slotselection[playerid]);
SendClientMessageEx(playerid, COLOR_RED, string);
SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Use /toys to wear/edit this");
}
}