public OnPlayerPickUpPickup(playerid, pickupid) { if(PlayerInfo[playerid][pLvDovana] == 0) { if(pickupid == dovana) GivePlayerMoney(playerid,1000); SendClientMessage(playerid, 0xDEEE20FF, "Sveikiname, prizas: 1000 LT."); PlayerInfo[playerid][pLvDovana] = true; } else { SendClientMessage(playerid, 0xDEEE20FF, "Jūs jau gavote priza!"); } if(PlayerInfo[playerid][pVip] == 1) { if(pickupid == vipams) GivePlayerWeapon(playerid, 31, 500); GivePlayerWeapon(playerid, 25, 500); SendClientMessage(playerid, 0xDEEE20FF, "Gavote VIP ginklus."); } else { SendClientMessage(playerid, 0xDEEE20FF, "Jūs ne VIP"); } return 1; }
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(PlayerInfo[playerid][pLvDovana] == 0)
{
if(pickupid == dovana)
{
GivePlayerMoney(playerid,1000);
SendClientMessage(playerid, 0xDEEE20FF, "Sveikiname, prizas: 1000 LT.");
PlayerInfo[playerid][pLvDovana] = true;
}
}
else
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs jau gavote priza!");
}
if(PlayerInfo[playerid][pVip] == 1)
{
if(pickupid == vipams)
{
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 500);
SendClientMessage(playerid, 0xDEEE20FF, "Gavote VIP ginklus.");
}
}
else
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs ne VIP");
}
return 1;
}
it could be because your PlayerInfo[playerid][pLvDovana] is not 0
|
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(PlayerInfo[playerid][pLvDovana] == true)
{
if(pickupid == dovana)
{
GivePlayerMoney(playerid,1000);
SendClientMessage(playerid, 0xDEEE20FF, "Sveikiname, prizas: 1000 LT.");
PlayerInfo[playerid][pLvDovana] = true;
}
}
else
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs jau gavote priza!");
}
if(PlayerInfo[playerid][pVip] == 1)
{
if(pickupid == vipams)
{
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 500);
SendClientMessage(playerid, 0xDEEE20FF, "Gavote VIP ginklus.");
}
}
else
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs ne VIP");
}
return 1;
}
There are ways to highlight issues with includes and suggest improvements, and there are ways to just be mean to people. If you don't know the difference - don't reply, you'll just put people off posting who may turn out to be great coders!
|
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(PlayerInfo[playerid][pLvDovana] == 0)
{
if(pickupid == dovana) GivePlayerMoney(playerid,1000);
SendClientMessage(playerid, 0xDEEE20FF, "Sveikiname, prizas: 1000 LT.");
PlayerInfo[playerid][pLvDovana] = true;
}
else if(PlayerInfo[playerid][pLvDovana] == true)
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs jau gavote priza!");
}
if(PlayerInfo[playerid][pVip] == 1)
{
if(pickupid == vipams) GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 500);
SendClientMessage(playerid, 0xDEEE20FF, "Gavote VIP ginklus.");
}
else
{
SendClientMessage(playerid, 0xDEEE20FF, "Jūs ne VIP");
}
return 1;
}