13.05.2011, 20:08
Ge force 512mb
Esto tengo mas abajo de OnPlayerUpdate:
El sistema de clanes via dini + colores.
Esto tengo mas abajo de OnPlayerUpdate:
pawn Код:
if(CColor[playerid] == true)
{
new
keys,
updown,
leftright,
Archivo[64];
GetPlayerKeys(playerid, keys, updown, leftright);
if(updown < 0) CSelec[playerid]--;//ARRIBA
else if(updown > 0) CSelec[playerid]++;//ABAJO
if(CSelec[playerid] > 4) CSelec[playerid] = 1;
else if(CSelec[playerid] < 1) CSelec[playerid] = 4;
if(keys & KEY_FIRE)
{
new
ColorC = RGBA(COLORES[playerid][0], COLORES[playerid][1], COLORES[playerid][2], COLORES[playerid][3]);
format(Archivo, sizeof Archivo, "Clanes/%s.ini", Clan_TAG[playerid]);
dini_IntSet(Archivo, "Color", ColorC);
CColor[playerid] = false;
OcultarCombinador(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
if(Clan_ID[playerid] == Clan_ID[i])
SetPlayerColor(i, ColorC);
}
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, "~y~~h~ Color seleccionado", 3000, 4);
}
if(leftright > 0)//DERECHA
{
if(CSelec[playerid] == 1)//ROJO
{
if(keys & KEY_SPRINT) COLORES[playerid][0] += 5;
else COLORES[playerid][0]++;
if(COLORES[playerid][0] > 255) COLORES[playerid][0] = 0;
}
if(CSelec[playerid] == 2)//VERDE
{
if(keys & KEY_SPRINT) COLORES[playerid][1] += 5;
else COLORES[playerid][1]++;
if(COLORES[playerid][1] > 255) COLORES[playerid][1] = 0;
}
if(CSelec[playerid] == 3)//AZUL
{
if(keys & KEY_SPRINT) COLORES[playerid][2] += 5;
else COLORES[playerid][2]++;
if(COLORES[playerid][2] > 255) COLORES[playerid][2] = 0;
}
if(CSelec[playerid] == 4)//ALPHA
{
if(keys & KEY_SPRINT) COLORES[playerid][3] += 5;
else COLORES[playerid][3]++;
if(COLORES[playerid][3] > 255) COLORES[playerid][3] = 0;
}
}
if(leftright < 0)//IZQUIERDA
{
if(CSelec[playerid] == 1)//ROJO
{
if(keys & KEY_SPRINT) COLORES[playerid][0] -= 5;
else COLORES[playerid][0]--;
if(COLORES[playerid][0] < 0) COLORES[playerid][0] = 255;
}
if(CSelec[playerid] == 2)//VERDE
{
if(keys & KEY_SPRINT) COLORES[playerid][1] -= 5;
else COLORES[playerid][1]--;
if(COLORES[playerid][1] < 0) COLORES[playerid][1] = 255;
}
if(CSelec[playerid] == 3)//AZUL
{
if(keys & KEY_SPRINT) COLORES[playerid][2] -= 5;
else COLORES[playerid][2]--;
if(COLORES[playerid][2] < 0) COLORES[playerid][2] = 255;
}
if(CSelec[playerid] == 4)//ALHPA
{
if(keys & KEY_SPRINT) COLORES[playerid][3] -= 5;
else COLORES[playerid][3]--;
if(COLORES[playerid][3] < 0) COLORES[playerid][3] = 255;
}
}
ActualizarCombinador(playerid);
}
return 1;
}