Quote:
Originally Posted by lelemaster
I have a question for you, why did you make a loop and you do not use your variable i?
I'll make your code simple.
pawn Код:
for(new i = 0; i < 247; i++) { if(PlayerToPoint(1.0,i,2.1507,-29.0139,1003.5494) || PlayerToPoint(1.0,i,-28.1577,-89.9538,1003.5469) || PlayerToPoint(1.0,i,-29.0530,-185.1293,1003.5469)) { ShowPlayerDialog(i, 752, DIALOG_STYLE_LIST, "Welcome to 24/7", "Phone Book ($20) \nDice($10) \nMask($50) \nWatch($35) \nWalkieTalkie($50) \nSpray can($90) \nSprunk Can($3) \nRope($100) \nCigarettes($20) \nLighter($5) \nSeeds($100) \nHidden Number($20) \nMP3 Player($70)\nRoller Skates($25)\nCellphone($55)\nPhone Card($20)", "Buy", "Cancel"); } }
EDIT: I wish the i was for the players, if so, you could use MAX_PLAYERS instead.
|
...Sorry wrong. Dialogid should be player-specific.
pawn Код:
ShowPlayerDialog(playerid, 752+playerid, DIALOG_STYLE_LIST, "Welcome to 24/7", "Phone Book ($20) \nDice($10) \nMask($50) \nWatch($35) \nWalkieTalkie($50) \nSpray can($90) \nSprunk Can($3) \nRope($100) \nCigarettes($20) \nLighter($5) \nSeeds($100) \nHidden Number($20) \nMP3 Player($70)\nRoller Skates($25)\nCellphone($55)\nPhone Card($20)", "Buy", "Cancel");
I'm guessing that loop isn't necessary at all.. Who knows. Also, there's bracket missing after second if -statement.