23.05.2012, 09:31
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
case D_Toy:
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerScore(playerid) < 8)
{
SendClientMessage(playerid,C_SKYBLUE,"Not enough score!");
return 1;
}
else
{
// m4 -
SetPlayerAttachedObject( playerid, 0, 356, 1, -0.177908, -0.158685, -0.085900, 0.888899, 13.451434, 0.000000, 1.000000, 1.000000, 1.000000 );
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
{
// PoliceShield1 - Shield
SetPlayerAttachedObject( playerid, 0, 18637, 1, 0.046957, -0.116120, 0.109620, 269.251220, 174.381561, 90.427261, 1.000000, 1.000000, 1.000000 );
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
{
// TheParrot1 - Parrot
SetPlayerAttachedObject( playerid, 0, 19078, 1, 0.352603, -0.075285, -0.167187, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
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
{
// CJ_SMOKE_MACH - smoke
SetPlayerAttachedObject( playerid, 0, 2780, 1, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
SendClientMessage(playerid, COLOR_YELLOW, "Your Smoke Machine has been granted!");
}
}
}
}
}
return 1;
}