Jump to content

Westerfer32

Membru
  • Posts

    3
  • Joined

  • Last visited

Westerfer32's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Vreau comanda pentru mysql serverul e cu IF nu cu cmd vreau sa o schimbati in if in genul la asta if(strcmp(cmd, "/pozitiemoto", true) == 0) { if(PlayerData[playerid][pPcarkey2] != 999) { new Float:X,Float:Y,Float:Z; GetVehiclePos(PlayerData[playerid][pPcarkey2]+PreVehicle, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z,5); CP[playerid] = 450; SendClientMessage(playerid, COLOR_GRAD1, "Ti-am pus un checkpoint pe harta, acolo iti este motocicleta."); return 1; } else { SendClientMessage(playerid, COLOR_GRAD1, "Nu detii o motocicleta personala."); } return 1; } Sa fie ca asta sa nu mai fie cu cmd ... si cu paramas si etc ..
  2. E o comanda prin care se joaca barbut ... /dice sumajoci cu serverul ... vreau sa o trec pe mysql si sa ia din bani si sa dea daca se castiga
  3. Problemă întâlnită (descriere):E o comanda dice e pe cmd si as vrea sa o schimb pentru un server mysql ... Ero(area / rile) / warning-(ul / urile):Multe Liniile de cod / sursa / script-ul: [pawn]CMD:dice(playerid, params[]){ new bet; if (sscanf(params, "i",bet)) { SendClientMessage(playerid,MSGCMDS_COLOR, "Usage: "/Dice <amount to bet>""); } else { if (bet<1) { SendClientMessage(playerid,MSGFAIL_COLOR, "Are you kidding me? Bet a positive amount."); } else if (bet>1000000) { SendClientMessage(playerid,MSGFAIL_COLOR, "Erm.. To protect a player from losing all his Money, theres a Limit of $1,000,000"); } else { new Cash=GetPlayerMoney(playerid); if (Cash<bet) { new string[128]; format(string,sizeof(string),"No Money - No Bet. Your Cash: $%i",Cash); SendClientMessage(playerid,MSGFAIL_COLOR,string); } else { new NumberDrawn11,NumberDrawn12,NumberDouble1,NumberDrawn21,NumberDrawn22,NumberDouble2,Winner; NumberDrawn11=random(6)+1; NumberDrawn12=random(6)+1; if (NumberDrawn11==NumberDrawn12) NumberDouble1=NumberDrawn11; NumberDrawn21=random(6)+1; NumberDrawn22=random(6)+1; if (NumberDrawn21==NumberDrawn22) NumberDouble2=NumberDrawn21; if (NumberDrawn11+NumberDrawn12>NumberDrawn21+NumberDrawn22) { Winner=1; } else if (NumberDrawn11+NumberDrawn12<NumberDrawn21+NumberDrawn22) { Winner=2; } else { if (NumberDouble1>NumberDouble2) Winner=1; else if (NumberDouble1<NumberDouble2) Winner=2; } new string[64]; format(string,sizeof(string),"Numbers Diced 1: %d %d",NumberDrawn11,NumberDrawn12); SendClientMessage(playerid,MSGINFO_COLOR,string); format(string,sizeof(string),"Numbers Diced 2: %d %d",NumberDrawn21,NumberDrawn22); SendClientMessage(playerid,MSGINFO_COLOR,string); if (Winner==1) { if (NumberDouble1>0) { format(string,sizeof(string),"You won $%d, a double!",bet*2); SendClientMessage(playerid,MSGSUCC_COLOR,string); SetPVarInt(playerid,"Money",GetPVarInt(playerid,"Money")+bet*2); GivePlayerMoney(playerid,bet*2); } else { format(string,sizeof(string),"You won $%d",bet); SendClientMessage(playerid,MSGSUCC_COLOR,string); SetPVarInt(playerid,"Money",GetPVarInt(playerid,"Money")+bet); GivePlayerMoney(playerid,bet); } } else if (Winner==2) { format(string,sizeof(string),"You lost $%d",bet); SendClientMessage(playerid,MSGFAIL_COLOR,string); SetPVarInt(playerid,"Money",GetPVarInt(playerid,"Money")-bet); GivePlayerMoney(playerid,-bet); } else if (Winner==0) { format(string,sizeof(string),"Draw",bet); SendClientMessage(playerid,MSGFAIL_COLOR,string); } } } } return 1; }[/pawn] Imagini / Video (optional):nu Aţi încercat să rezolvaţi singur?:De 1 zi incerc Rog un scripter bun daca doreste sa ma ajute
×
×
  • Create New...

Important Information

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.