- 0
ajutor rpd va rog
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
carol_98
salut all deci am facut un bar nou si vreau sa pun comanda /drink am aceasta comanda in GM dar nu stiu unde sa pun coordonatele va rog mult ajutatima
Comanda drink
if(strcmp(cmd, "/drink", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsAtBar(playerid)) { if(PlayerDrunk[playerid] < 10) { new Float:health; new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_YELLOW, "|__________________ Bar Drinks __________________|"); SendClientMessage(playerid, COLOR_2RED, "USAGE: /drink [drinkname]"); SendClientMessage(playerid, COLOR_BLUE, "Available names: Bere ($6), Vodka ($10), Whiskey ($10), Apa ($2), Pepsi($2)"); SendClientMessage(playerid, COLOR_YELLOW, "|________________________________________________|"); return 1; } if(strcmp(x_nr,"bere",true) == 0) { if(PlayerInfo[playerid][pAge] < 12) { SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 12 ani sa poti sa bei Bere!"); return 1; } GivePlayerMoneyEx(playerid, - 6); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s a baut o bere rece.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); PlayerDrunk[playerid] += 1; } else if(strcmp(x_nr,"vodka",true) == 0) { if(PlayerInfo[playerid][pAge] < 13) { SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 13 ani sa poti sa bei Vodka!"); return 1; } GivePlayerMoneyEx(playerid, - 10); PlayerDrunk[playerid] += 2; SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s a baut o vodka.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else if(strcmp(x_nr,"whiskey",true) == 0) { if(PlayerInfo[playerid][pAge] < 13) { SendClientMessage(playerid, COLOR_2RED, "Barman: Scuze,dar trebuie sa ai cel putin 13 ani sa poti sa bei Whiskey!"); return 1; } GivePlayerMoneyEx(playerid, - 10); PlayerDrunk[playerid] += 3; SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_BEER); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s a baut un whiskey.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else if(strcmp(x_nr,"apa",true) == 0) { GivePlayerMoneyEx(playerid, - 2); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s a baut o apa borsec rece.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); if(GetPlayerHealth(playerid, health) < 100) { if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); } else { SetPlayerHealth(playerid, health + 5.0); } } } else if(strcmp(x_nr,"pepsi",true) == 0) { GivePlayerMoneyEx(playerid, - 2); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s a baut un pepsi rece.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); if(GetPlayerHealth(playerid, health) < 100) { if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); } else { SetPlayerHealth(playerid, health + 5.0); } } } else { SendClientMessage(playerid, COLOR_2RED, "Barman: Nu cunosc nici o bautura cu acest nume."); return 1; } } else { SendClientMessage(playerid, COLOR_2RED, "Nu mai poti sa bei mult, vei intra in COMA ALCOOLICA!"); return 1; } } else { SendClientMessage(playerid, COLOR_2RED, "Nu esti la BAR!"); return 1; } } return 1; }3 answers to this question
Recommended Posts