23.07.2018, 15:43
I'm having trouble with this code, Please help me, I'm Thank
[warning 225: unreachable code]
Error it informs this paragraph
duel[playerid] = giveplayerid, moneyduel[playerid] = money, weaponduel[playerid] = weaponid;
[warning 225: unreachable code]
PHP код:
if(PlayerInfo[playerid][pCash] < money) return SendClientMessageEx(playerid, -1, "Ban khong du so tien do de moi dau sung");
if(PlayerInfo[giveplayerid][pCash] < money) return SendClientMessageEx(playerid, -1, "Nguoi do khong co du so tien de dau sung");
if(strcmp(sung, "deagle", true) == 0) return weaponid = 24;
else if(strcmp(sung, "Shotgun", true) == 0) return weaponid = 25;
else return SendClientMessageEx(playerid, COLOR_GREY, "Sai ten vu khi");
duel[playerid] = giveplayerid, moneyduel[playerid] = money, weaponduel[playerid] = weaponid;
duel[giveplayerid] = playerid, moneyduel[giveplayerid] = money, weaponduel[giveplayerid] = weaponid;
new string[255];
format(string, sizeof(string), "[DAU SUNG]: Ban da moi %s tham gia dau sung voi $%d, vu khi: %s", GetPlayerNameEx(giveplayerid),money,sung);
SendClientMessageEx(playerid, -1, string);
format(string, sizeof(string), "[DAU SUNG]: %s da moi ban tham gia dau sung voi $%d, vu khi: %s", GetPlayerNameEx(playerid),money,sung);
SendClientMessageEx(giveplayerid, -1, string);
SetPVarInt(giveplayerid, "moidausung", 1);
duel[playerid] = giveplayerid, moneyduel[playerid] = money, weaponduel[playerid] = weaponid;