17.05.2012, 12:06
Error:
Line:
Command:
pawn Код:
D:\lucru\1_3_samp\1.3 samp 0.3e\gamemodes\inaintedetaxi2.pwn(55006) : warning 225: unreachable code
pawn Код:
55006: if(strcmp(cmd, "/contract", true) == 0)
pawn Код:
if(strcmp(cmd, "/contract", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "{00A6FF}>>{FFFFFF} Scrie: /contract [playerid/PartOfName] [amount]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "{00A6FF}>>{FFFFFF} Scrie: /contract [playerid/PartOfName] [amount]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1000 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Contractele incep de la $1000 pana la $100000!"); return 1; }
if(PlayerInfo[playerid][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Ai nevoie de level 2 ca sa pui un contract !");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] == 14 && PlayerInfo[playerid][pMember] == 14)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Ne pare rau, dar nu poti pune un Contract pe un Hitman.");
return 1;
}
else if(PlayerInfo[giveplayerid][pLeader] == 14 && PlayerInfo[playerid][pMember] == 14)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Ne pare rau, dar nu poti pune un Contract pe un Hitman.");
return 1;
}
else if(PlayerInfo[giveplayerid][pMember] == 14||PlayerInfo[giveplayerid][pLeader] == 14)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Ne pare rau, dar nu poti pune un Contract pe un Hitman.");
return 1;
}
if(gTeam[giveplayerid] == 2 && moneys != 100000)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Un contract pe un Cops costa 100.000$.");
return 1;
}
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Nu poti sa pui un contract pe tine insusi."); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = GetPlayerMoney(playerid);
if (moneys > 0 && playermoney >= moneys)
{
GivePlayerMoney(playerid, (0 - moneys));
PlayerInfo[giveplayerid][pHeadValue]+=moneys;
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} %s a pus un contract pe %s, cu %d$.",sendername, giveplayer, moneys);
SendFamilyMessage(8, COLOR_YELLOW, string);
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} Ai pus un contract pe %s, cu %d$.",giveplayer, moneys);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
}
}
}
else
{
format(string, sizeof(string), "{FFFFFF}[{4FD359}RCRPR{FFFFFF}]: Acest jucator nu este Online.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
return 1;
}