31.05.2010, 01:52
Unreachable code on
Код:
if((slot == 2) && (PlayerInfo[playerid][pCKey2] != 255))
pawn Код:
if((slot == 1) && (PlayerInfo[playerid][pCKey] != 255))
{
SendClientMessage(playerid, COLOR_RED, "That car key slot is full! Choose a different slot (1/2) or sell your car!");
return 1;
}
else
{
CInfo[carid][cBought] = 1;
PlayerInfo[playerid][pCKey] = carid+1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CInfo[carid][cOwner], sendername, 0, strlen(sendername), 255);
AntiHack(playerid,-CInfo[carid][cValue]);
SendClientMessage(playerid, COLOR_GREEN, "Success. You have purchased this car into slot [1], type /carinfo [key slot]");
OnPropUpdate();
return 1;
}
if((slot == 2) && (PlayerInfo[playerid][pCKey2] != 255))
{
SendClientMessage(playerid, COLOR_RED, "That car key slot is full! Choose a different slot (1/2) or sell your car!");
return 1;
}
else
{
CInfo[carid][cBought] = 1;
PlayerInfo[playerid][pCKey2] = carid+1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CInfo[carid][cOwner], sendername, 0, strlen(sendername), 255);
AntiHack(playerid,-CInfo[carid][cValue]);
SendClientMessage(playerid, COLOR_GREEN, "Success. You have purchased this car into slot [2], type /carinfo [key slot]");
OnPropUpdate();
return 1;
}
}