23.05.2012, 09:36
pawn Код:
new Menu:CurrentMenu = GetPlayerMenu(playerid); // HERE IS TO CHECK THE PLAYER MENU
if(CurrentMenu == HERE) // PUT THE NAME OF YOUR MENU
{
switch(row)
{
case 0:
{
if(GetPlayerScore(playerid) < 8)
{
SendClientMessage(playerid,C_SKYBLUE,"Not enough score!");
return 1;
}
else
SetPlayerAttachedObject( playerid, 0, 356, 1, -0.177908, -0.158685, -0.085900, 0.888899, 13.451434, 0.000000, 1.000000, 1.000000, 1.000000 ); // m4 -
SendClientMessage(playerid, COLOR_YELLOW, "Your M4 has been granted!");
}
case 1:
{
if(GetPlayerScore(playerid) < 12)
{
SendClientMessage(playerid,C_SKYBLUE,"Not enough score!");
return 1;
}
else
SetPlayerAttachedObject( playerid, 0, 18637, 1, 0.046957, -0.116120, 0.109620, 269.251220, 174.381561, 90.427261, 1.000000, 1.000000, 1.000000 ); // PoliceShield1 - Shield
SendClientMessage(playerid, COLOR_YELLOW, "Your Riot Shield has been granted!");
}
case 2:
{
if(GetPlayerScore(playerid) < 20)
{
SendClientMessage(playerid,C_SKYBLUE,"Not enough score!");
return 1;
}
else
SetPlayerAttachedObject( playerid, 0, 19078, 1, 0.352603, -0.075285, -0.167187, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // TheParrot1 - Parrot
SendClientMessage(playerid, COLOR_YELLOW, "Your Parrot has been granted!");
}
case 3:
{
if(GetPlayerScore(playerid) < 50)
{
SendClientMessage(playerid,C_SKYBLUE,"Not enough score!");
return 1;
}
else
SetPlayerAttachedObject( playerid, 0, 2780, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_SMOKE_MACH - smoke
SendClientMessage(playerid, COLOR_YELLOW, "Your Smoke Machine has been granted!");
}
}
}