25.06.2015, 21:44
(
Last edited by DeadNudock; 19/07/2015 at 04:19 PM.
)
resolvi smd..
if(Carlos == "good")
foreach(new i : Player)
{
SendClientMessage(i, -1, "CARLOS IS GOOD!");
}
I tried to let the faster code, let easier to understand, more can not, please someone can tell me how I can remove the
PHP Code:
PHP Code:
|
if (CofreOrg[GetPlayerOrg(i)][salarioc1] == 0)
{}///
else if (CofreOrg[GetPlayerOrg(i)][Dinheiro] < CofreOrg[GetPlayerOrg(i)][salarioc1])
{
PlayerInfo[i][pSalario] += CofreOrg[GetPlayerOrg(i)][salarioc1];
SacarGranaOrg(GetPlayerOrg(i), CofreOrg[GetPlayerOrg(i)][salarioc1]);
}
// Change to
if (CofreOrg[GetPlayerOrg(i)][salarioc1] != 0 && CofreOrg[GetPlayerOrg(i)][Dinheiro] < CofreOrg[GetPlayerOrg(i)][salarioc1])
{
PlayerInfo[i][pSalario] += CofreOrg[GetPlayerOrg(i)][salarioc1];
SacarGranaOrg(GetPlayerOrg(i), CofreOrg[GetPlayerOrg(i)][salarioc1]);
}
if (IsGangueGRI(i))
{
switch(PlayerInfo[i][pCargo]){
case 1:
if (CofreOrg[GetPlayerOrg(i)][salarioc1] != 0 && CofreOrg[GetPlayerOrg(i)][Dinheiro] < CofreOrg[GetPlayerOrg(i)][salarioc1])
{
PlayerInfo[i][pSalario] += CofreOrg[GetPlayerOrg(i)][salarioc1];
SacarGranaOrg(GetPlayerOrg(i), CofreOrg[GetPlayerOrg(i)][salarioc1]);
}
case 2:
// next section
case 3:
// etc
}
}