03.05.2013, 00:03
No need for useless return
pawn Код:
if(dialogid == 40)
{
if(response)
{
switch(listitem)
{
case 0:
{
new string[128];
if(server_GetCash(playerid) >= 5)
{
SendClientMessage(playerid, COLOR_WHITE, "You've purchased a sprunk!");
server_GiveCash(playerid, -5);
PlayerInfo[playerid][pSprunk]= PlayerInfo[playerid][pSprunk]+1;
GameTextForPlayer(playerid, "~r~$-5", 1000,1);
format(string, sizeof(string), "* %s has bought a sprunk for $5.", GetName(playerid));
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Not enough money!");
}
}
}