Hello everybody once again
i am playing on server that contains this flip coin game
Its like if S or H you win or loose
if you dont understand some words its lithuanian language you can translate with google
some translations:
sutinki its agree
laimejote its win
pralaimejote its loose
pasiule its player wants to flip coin with you
So my question:
is it possible to win everytime? maybe give influence with other script? and if it possible how should i do it?
i am playing on server that contains this flip coin game
Code:
new PasiuleMS[MAX_PLAYERS],PasiuleMZ[MAX_PLAYERS][2],PasiuleMID[MAX_PLAYERS];
CMD:moneta(playerid,params[]){
new ID,Suma,Simbolis[2];
if(sscanf(params,"uis[2]",ID,Suma,Simbolis)) return SendClientMessage(playerid,-1,"/moneta V_P/ID Suma S/H");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Tokio žaidėjo nėra");
if(PasiuleMID[playerid] != INVALID_PLAYER_ID){
if(PasiuleMID[playerid] == ID && PasiuleMS[playerid] == Suma){
new Rand = random(2),Zin[128];
if(Rand == 0){
if(!strcmp(PasiuleMZ[playerid],"s")){
format(Zin,sizeof(Zin),"* Laimėjote %i €",PasiuleMS[playerid] / 100 * 80);
SendClientMessage(PasiuleMID[playerid],-1,Zin);
format(Zin,sizeof(Zin),"* Pralaimėjote %i €",PasiuleMS[playerid]);
SendClientMessage(playerid,-1,Zin);
GivePlayerMoney(PasiuleMID[playerid], PasiuleMS[playerid] / 100 * 80);
GivePlayerMoney(playerid, -PasiuleMS[playerid]);
}else{
format(Zin,sizeof(Zin),"* Laimėjote %i €",PasiuleMS[playerid] / 100 * 80);
SendClientMessage(playerid,-1,Zin);
format(Zin,sizeof(Zin),"* Pralaimėjote %i €",PasiuleMS[playerid]);
SendClientMessage(PasiuleMID[playerid],-1,Zin);
GivePlayerMoney(PasiuleMID[playerid], -PasiuleMS[playerid]);
GivePlayerMoney(playerid, PasiuleMS[playerid] / 100 * 80);
}
}
if(Rand == 1){
if(!strcmp(PasiuleMZ[playerid],"h")){
format(Zin,sizeof(Zin),"* Laimėjote %i €",PasiuleMS[playerid] / 100 * 80);
SendClientMessage(PasiuleMID[playerid],-1,Zin);
format(Zin,sizeof(Zin),"* Pralaimėjote %i €",PasiuleMS[playerid]);
SendClientMessage(playerid,-1,Zin);
GivePlayerMoney(PasiuleMID[playerid], PasiuleMS[playerid] / 100 * 80);
GivePlayerMoney(playerid, -PasiuleMS[playerid]);
}else{
format(Zin,sizeof(Zin),"* Laimėjote %i €",PasiuleMS[playerid] / 100 * 80);
SendClientMessage(playerid,-1,Zin);
format(Zin,sizeof(Zin),"* Pralaimėjote %i €",PasiuleMS[playerid]);
SendClientMessage(PasiuleMID[playerid],-1,Zin);
GivePlayerMoney(PasiuleMID[playerid], -PasiuleMS[playerid]);
GivePlayerMoney(playerid, PasiuleMS[playerid] / 100 * 80);
}
}
return 1;
}
}
PasiuleMID[ID] = playerid;
PasiuleMS[ID] = Suma;
strins(PasiuleMZ[playerid],Simbolis,0);
new Names[MAX_PLAYER_NAME],Zin[128];
GetPlayerName(playerid,Names,24);
if(!strcmp(Simbolis,"s")){
format(Zin,sizeof(Zin),"%s pasiūlė jums mesti monetą, jis sako, kad atvirs skaičius, statymas %i, gali laimėti %i",Names,Suma, Suma / 100 * 80);
SendClientMessage(ID,-1,Zin);
format(Zin,sizeof(Zin),"Jeigu sutinki rašyk /moneta %s %i S", Names, Suma);
SendClientMessage(ID,-1,Zin);
}
if(!strcmp(Simbolis,"h")){
format(Zin,sizeof(Zin),"%s pasiūlė jums mesti monetą, jis sako, kad atvirs herbas, statymas %i, gali laimėti %i",Names,Suma, Suma / 100 * 80);
SendClientMessage(ID,-1,Zin);
format(Zin,sizeof(Zin),"Jeigu sutinki rašyk /moneta %s %i H", Names, Suma);
SendClientMessage(ID,-1,Zin);
}
return 1;
}
Its like if S or H you win or loose
if you dont understand some words its lithuanian language you can translate with google
some translations:
sutinki its agree
laimejote its win
pralaimejote its loose
pasiule its player wants to flip coin with you
So my question:
is it possible to win everytime? maybe give influence with other script? and if it possible how should i do it?