Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //cmd
- CMD:buyphone(playerid, params[])
- {
- if(Player[playerid][Phone] == 1)
- {
- SCM(playerid, COLOR_LIGHTRED, "Vous avez déjà un téléphone");
- }
- else
- {
- TextDrawShowForPlayer(playerid, CHOIXTEXTCOLOR);
- TextDrawShowForPlayer(playerid, COLORPHONEBLACK);
- TextDrawShowForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawShowForPlayer(playerid, COLORPHONEVERT);
- TextDrawShowForPlayer(playerid, COLORPHONEBLEU);
- TextDrawShowForPlayer(playerid, COLORPHONEORANGE);
- TextDrawShowForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawShowForPlayer(playerid, BOUTONACHETERPHONE);
- SelectTextDraw(playerid, 0xFF0000FF);
- }
- return 1;
- }
- //OnPlayerClickTextDraw
- else if(clickedid == COLORPHONEBLACK)
- {
- SCM(playerid, COLOR_GREEN, "Tu viens d'acheté un téléphone de couleur noir");
- TextDrawHideForPlayer(playerid, COLORPHONEBLACK);
- TextDrawHideForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawHideForPlayer(playerid, COLORPHONEVERT);
- TextDrawHideForPlayer(playerid, COLORPHONEBLEU);
- TextDrawHideForPlayer(playerid, COLORPHONEORANGE);
- TextDrawHideForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawHideForPlayer(playerid, BOUTONACHETERPHONE);
- TextDrawHideForPlayer(playerid, CHOIXTEXTCOLOR);
- Player[playerid][Phone] = 1;
- CancelSelectTextDraw(playerid);
- UpdatePlayerData(playerid);
- }
- else if(clickedid == COLORPHONEJAUNE)
- {
- SCM(playerid, COLOR_GREEN, "Tu viens d'acheté un téléphone de couleur jaune");
- TextDrawHideForPlayer(playerid, COLORPHONEBLACK);
- TextDrawHideForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawHideForPlayer(playerid, COLORPHONEVERT);
- TextDrawHideForPlayer(playerid, COLORPHONEBLEU);
- TextDrawHideForPlayer(playerid, COLORPHONEORANGE);
- TextDrawHideForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawHideForPlayer(playerid, BOUTONACHETERPHONE);
- TextDrawHideForPlayer(playerid, CHOIXTEXTCOLOR);
- Player[playerid][Phone] = 1;
- CancelSelectTextDraw(playerid);
- UpdatePlayerData(playerid);
- }
- else if(clickedid == COLORPHONEVERT)
- {
- SCM(playerid, COLOR_GREEN, "Tu viens d'acheté un téléphone de couleur vert");
- TextDrawHideForPlayer(playerid, COLORPHONEBLACK);
- TextDrawHideForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawHideForPlayer(playerid, COLORPHONEVERT);
- TextDrawHideForPlayer(playerid, COLORPHONEBLEU);
- TextDrawHideForPlayer(playerid, COLORPHONEORANGE);
- TextDrawHideForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawHideForPlayer(playerid, BOUTONACHETERPHONE);
- TextDrawHideForPlayer(playerid, CHOIXTEXTCOLOR);
- Player[playerid][Phone] = 1;
- CancelSelectTextDraw(playerid);
- UpdatePlayerData(playerid);
- }
- else if(clickedid == COLORPHONEORANGE)
- {
- SCM(playerid, COLOR_GREEN, "Tu viens d'acheté un téléphone de couleur orange");
- TextDrawHideForPlayer(playerid, COLORPHONEBLACK);
- TextDrawHideForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawHideForPlayer(playerid, COLORPHONEVERT);
- TextDrawHideForPlayer(playerid, COLORPHONEBLEU);
- TextDrawHideForPlayer(playerid, COLORPHONEORANGE);
- TextDrawHideForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawHideForPlayer(playerid, BOUTONACHETERPHONE);
- TextDrawHideForPlayer(playerid, CHOIXTEXTCOLOR);
- CancelSelectTextDraw(playerid);
- Player[playerid][Phone] = 1;
- UpdatePlayerData(playerid);
- }
- else if(clickedid == COLORPHONEBLEU)
- {
- SCM(playerid, COLOR_GREEN, "Tu viens d'acheté un téléphone de couleur bleu");
- TextDrawHideForPlayer(playerid, COLORPHONEBLACK);
- TextDrawHideForPlayer(playerid, COLORPHONEJAUNE);
- TextDrawHideForPlayer(playerid, COLORPHONEVERT);
- TextDrawHideForPlayer(playerid, COLORPHONEBLEU);
- TextDrawHideForPlayer(playerid, COLORPHONEORANGE);
- TextDrawHideForPlayer(playerid, PREVIEWCOLORPHONE);
- TextDrawHideForPlayer(playerid, BOUTONACHETERPHONE);
- TextDrawHideForPlayer(playerid, CHOIXTEXTCOLOR);
- CancelSelectTextDraw(playerid);
- Player[playerid][Phone] = 1;
- UpdatePlayerData(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment