Little problem.
#7

One small thing that bothers me, what's the model variable actually for or how is it assigned?

Also, a small thing to make your code better would be using a switch statement there.
pawn Код:
switch(model)
{
    case 534:
    {
    }
    case 533:
    {
    }
    //...
}
Something to make your code better structured (for some eyes that is):
pawn Код:
// instead of this:
if(response)
{
    switch(model)
    {
        // ...
    }
}

// act like this:
if(!response)
    return true;

switch(model)
{
    // ...
}
There's some useless returning as well...
pawn Код:
if(PlayerData[playerid][pcar] == -1)
{
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=1");
}
else
{
    SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=2");
    return 1; // <-- useless return,
}
return 1; // <-- this one will do the job
Reply


Messages In This Thread
Little problem. - by budelis - 27.07.2011, 14:55
Re: Little problem. - by Davz*|*Criss - 27.07.2011, 15:01
Re: Little problem. - by budelis - 27.07.2011, 16:39
Re: Little problem. - by budelis - 27.07.2011, 18:48
Re: Little problem. - by budelis - 27.07.2011, 20:34
Re: Little problem. - by Pasa - 27.07.2011, 21:57
Re: Little problem. - by AndreT - 27.07.2011, 21:59
Re: Little problem. - by budelis - 29.07.2011, 12:22
Re: Little problem. - by budelis - 29.07.2011, 14:26
Re: Little problem. - by Guest3598475934857938411 - 29.07.2011, 15:35

Forum Jump:


Users browsing this thread: 2 Guest(s)