Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // la inceput de gm puneti
- #define DIALOG_BONUS 1938
- ///
- // la public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) , cautati linia if(newkeys & KEY_SECONDARY_ATTACK) , si adaugati putin mai jos asta :
- if(IsPlayerInRangeOfPoint(playerid, 2,1478.4806,-1761.0885,17.8425)) // aici va puneti locatia de unde se va lua bonusul
- {
- new String[128], bString2[150];
- if(PlayerInfo[playerid][pLevel] >1) return SCM(playerid, COLOR_RED, "Ne cerem scuze , ai primit deja bonusul , daca nu ai primit bonusul , contacteaza un admin!");
- format(String, sizeof(String), "Premier\n");
- format(bString2, sizeof(bString2), "Faggio\n");
- strcat(String, bString2);
- SetPlayerScore(playerid, 2);
- PlayerInfo[playerid][pLevel] = 2;
- UpdateVar(playerid, "Level", 2);
- ShowPlayerDialog(playerid, DIALOG_BONUS, DIALOG_STYLE_LIST, "Bonus", String, "OK", "Close");
- //
- // la public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) , adaugati urmatoarea linie
- case DIALOG_BONUS :
- {
- if(!response) return true;
- new money[180], premium[180];
- switch(listitem) {
- case 0: {
- GiveVehicle(playerid, 426, 0, 0, 0, 0, 0);
- format(money, sizeof(money), "$2.500.000\n");
- format(premium, sizeof(premium), "25 premium points\n");
- strcat(money,premium);
- ShowPlayerDialog(playerid, DIALOG_BONUS+1, DIALOG_STYLE_LIST, "Bonus", money, "OK", "Close");
- }
- case 1: {
- GiveVehicle(playerid, 462, 0 , 0 , 0 ,0 , 0);
- format(money ,sizeof(money), "$2.500.000\n");
- format(premium, sizeof(premium), "25 premium points\n");
- strcat(money, premium);
- ShowPlayerDialog(playerid, DIALOG_BONUS+1, DIALOG_STYLE_LIST, "Bonus", money, "OK", "Close");
- }
- }
- }
- case DIALOG_BONUS+1 :
- {
- if(!response) return true;
- switch(listitem) {
- case 0: {
- GivePlayerCash(playerid, 1, 2500000);
- Update(playerid, pCashx);
- SCM(playerid, COLOR_GREY, "SERVER: Ai primit bonusul si level 2");
- }
- case 1: {
- PlayerInfo[playerid][pPremiumPoints] += 25;
- Update(playerid, pPremiumPointsx);
- SCM(playerid, COLOR_GREY, "SERVER:Ai primit bonusul si level 2");
- }
- }
- }
- //
- // la public OnPlayerConnect(playerid) adaugati asta
- format(gString, 100, "Apasa tasta F , pentru a lua bonusul special\n");
- CreateDynamic3DTextLabel(gString, 0xFFEA00FF,1478.4806,-1761.0885,17.8425, 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1); // aici puneti locatia unde vreti sa fie textul
- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement