Creditos: J4vi3r
Este esta Echo Para GM como ZC o Parecidos Mas Abajo de los Dejo con las Variables Parecidas a CM
//Agregamos
- Spoiler:
- pSuciedad,
//Luego esto en function LoadUser_data o Parecido
- Spoiler:
- INI_Int("Suciedad",Info[playerid][pSuciedad]);
//esto en resetplayervariables o Donde lo tengan
- Spoiler:
- Info[playerid][pSuciedad] = 0;
//esto en convertaccount o Donde tengan la variable de convertir la cuenta en el archivo .ini
- Spoiler:
- if( strcmp( key , "Suciedad" , true ) == 0 ) { val = ini_GetValue( Data ); Info[playerid][pSuciedad] = strval( val ); }
// este en Onplayersavestats o Donde Guarden la cuenta
- Spoiler:
- INI_WriteInt(File,"Suciedad",Info[playerid][pSuciedad]);
//Agregamos el comando:
- Spoiler:
- zcmd(suciedad, playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[80];
format(string, sizeof(string), "* Tu suciedad es del %d porciento.", Info[playerid][pSuciedad]);
SendClientMessageEx(playerid, COLOR_GRAD2, string);
}
return 1;
}
zcmd(lavarropa, playerid, params[])
{
new string[128];
if(PlayerToPoint(10.0,playerid,3937.3613,-820.6308,1874.0156) || PlayerToPoint(10.0,playerid,3937.7209,-834.2257,1874.0156))
{
if(CheckMoney(playerid, 150))
{
if(Info[playerid][pSuciedad] < 50) return SendClientMessageEx(playerid, COLOR_GRAD2, "* No tienes la ropa sucia, lavala luego.");
format(string, sizeof(string), "* %s se saca su ropa y la mete a la lavadora.", GetPlayerNameEx(playerid));
ProxDetector(12.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessageEx(playerid, COLOR_WHITE, "{DC092F}Lavanderia: {FFFFFF}Su ropa ha empezado a lavarse, espere un poco...");
SetTimerEx("Lavadora", 60000, false, "i", playerid);
if(Info[playerid][pSex] == 1) Skin(playerid, 252);
if(Info[playerid][pSex] == 2) Skin(playerid, 138);
}
} else SendClientMessageEx(playerid, COLOR_GRAD2, "No estas en la lavanderia.");
return 1;
}
//Ahora definimos la funcion de la Suciedad y Lavadora xd
- Spoiler:
- function CheckSuciedad()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[128], Float:health;
if(Info[i][pSuciedad] >= 25 && Info[i][pSuciedad] < 35)
{
SendClientMessageEx(i, COLOR_WHITE, "Tu ropa está un poco sucia, debes ir a lavarla.");
}
else if(Info[i][pSuciedad] >= 35 && Info[i][pSuciedad] < 50)
{
format(string, sizeof(string), "* %s desprende un olor un poco desagradable.", GetPlayerNameEx(i));
ProxDetector(20.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(Info[i][pSuciedad] >= 50)
{
GetPlayerHealth(i, health);
format(string, sizeof(string), "* %s desprende un olor un fétido.", GetPlayerNameEx(i));
ProxDetector(20.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessageEx(i, COLOR_GRAD2, "* Tu ropa está sucia, debes ir a lavarla con urgencia.");
SetHP(i, health-20);
}
}
}
return 1;
}
function Lavadora(playerid)
{
if(IsPlayerConnected(playerid))
{
new string[128];
Bought(playerid, 150);
format(string, sizeof string, "* %s toma su ropa limpia y se la pone.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessageEx(playerid, COLOR_WHITE, "{DC092F}Lavanderia: {FFFFFF}Has terminado de lavar tu ropa, esto te ha costado 150$.");
SetPlayerSkin(playerid, Info[playerid][pChar]);
Info[playerid][pSuciedad] = 0;
}
return 0;
}
//Ahora Bamos a saveAccounts o Donde tengan el timer que Guarda todo el servidor y cuentas agregan:
- Spoiler:
- SetTimer("CheckSuciedad", 60000, 0);
//Ahora Agregan :
- Spoiler:
- Info[playerid][pSuciedad] += 5;
//En Los comandos que Quieran Ejemplo en el /condon pueden ponerlo y se les agregara 5 puntos de suciedad al usuario
//Alos 25 Puntos comienza la funcion del Rol de Suciedad etc .
//tambien peuden agregarlo al payday asi se va quedando mejor yo le agrege por payday 15 puntos
- Spoiler:
- Info[i][pSuciedad] += 15;
Ahora para el Sistema de CM o Parecidos
//agregamos:
- Spoiler:
- pSuciedad,
PlayerInfo[playerid][pSuciedad] = 0;
//Creamos el Public Si lo tenis Definido solo agregale el SetTimer("CheckSuciedad", 60000, 0);
- Spoiler:
- public SaveAccounts()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) OnPlayerUpdateTime(i);
}
SetTimer("CheckSuciedad", 60000, 0);
return 1;
}
//Ahora bamos a:
// public OnPlayerUpdateTime(playerid)
//agregamos
- Spoiler:
- INI_WriteInt( PlayerAcc, "Suciedad", PlayerInfo[playerid][pSuciedad]);
//Ahora bamos a
// public LoadUser
- Spoiler:
- INI_Int( "Suciedad", PlayerInfo[playerid][pSuciedad]);
//agregamos este comando
- Spoiler:
- zcmd(lavarropa, playerid, params[])
{
new string[128];
if(PlayerToPoint(10.0,playerid,3937.3613,-820.6308,1874.0156) || PlayerToPoint(10.0,playerid,3937.7209,-834.2257,1874.0156))
{
if(CheckMoney(playerid, 150))
{
if(PlayerInfo[playerid][pSuciedad] < 50) return Message(playerid, COLOR_GRAD2, "* No tienes la ropa sucia, lavala luego.");
format(string, sizeof(string), "* %s se saca su ropa y la mete a la lavadora.", PlayerName(playerid));
ProxDetector(12.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Message(playerid, COLOR_WHITE, "{DC092F}Lavanderia: {FFFFFF}Su ropa ha empezado a lavarse, espere un poco...");
SetTimerEx("Lavadora", 60000, false, "i", playerid);
if(PlayerInfo[playerid][pSex] == 1) Skin(playerid, 252);
if(PlayerInfo[playerid][pSex] == 2) Skin(playerid, 138);
}
} else Message(playerid, COLOR_GRAD2, "No estas en la lavanderia.");
return 1;
}
zcmd(suciedad, playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[80];
format(string, sizeof(string), "* Tu suciedad es del %d porciento.", PlayerInfo[playerid][pSuciedad]);
Message(playerid, COLOR_GRAD2, string);
}
return 1;
}
//agregamos funciones:
- Spoiler:
- function CheckSuciedad()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[128], Float:health;
if(PlayerInfo[i][pSuciedad] >= 65 && PlayerInfo[i][pSuciedad] < 80)
{
Message(i, COLOR_WHITE, "Tu ropa está un poco sucia, debes ir a lavarla.");
}
else if(PlayerInfo[i][pSuciedad] >= 80 && PlayerInfo[i][pSuciedad] < 90)
{
format(string, sizeof(string), "* %s desprende un olor un poco desagradable.", PlayerName(i));
ProxDetector(20.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(PlayerInfo[i][pSuciedad] >= 90)
{
GetPlayerHealth(i, health);
format(string, sizeof(string), "* %s desprende un olor un fétido.", PlayerName(i));
ProxDetector(20.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Message(i, COLOR_GRAD2, "* Tu ropa está sucia, debes ir a lavarla con urgencia.");
SetHP(i, health-5);
}
}
}
return 1;
}
function Lavadora(playerid)
{
if(IsPlayerConnected(playerid))
{
new string[128];
Bought(playerid, 150);
Till(28, 150);
format(string, sizeof string, "* %s toma su ropa limpia y se la pone.", PlayerName(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Message(playerid, COLOR_WHITE, "{DC092F}Lavanderia: {FFFFFF}Has terminado de lavar tu ropa, esto te ha costado 150$.");
Skin(playerid, PlayerInfo[playerid][pChar]);
PlayerInfo[playerid][pSuciedad] = 0;
}
return 0;
}
//agregamos solo si no lo tensi definido o solo agrega el SetTimer("CheckSuciedad", 60000, 0);:
- Spoiler:
- public SaveAccounts()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) OnPlayerUpdateTime(i);
}
SetTimer("CheckSuciedad", 60000, 0);
return 1;
}
//Lo Mas importante los textos dinamicos
- Spoiler:
- CreateDynamic3DTextLabel("Lavadoras\nUsa /lavarropa", 0xE6DE48FF,3937.3613,-820.6308,1874.0156, 4.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0,0);
CreateDynamic3DTextLabel("Lavadoras\nUsa /lavarropa", 0xE6DE48FF,3937.7209,-834.2257,1874.0156, 4.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0,0);
MAPEO:
- Spoiler:
- // Lavanderia (By MaluGonza)
CreateDynamicObject(14665, 3937.37, -827.41, 1875.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3932.90, -817.00, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3934.80, -816.90, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3936.50, -817.00, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3938.30, -816.90, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(1208, 3936.50, -816.90, 1874.10, 0.00, 0.00, 178.00);
CreateDynamicObject(1208, 3938.30, -816.90, 1874.10, 0.00, 0.00, 177.99);
CreateDynamicObject(1208, 3934.80, -816.90, 1874.10, 0.00, 0.00, 177.99);
CreateDynamicObject(1208, 3932.90, -816.90, 1874.10, 0.00, 0.00, 177.99);
CreateDynamicObject(2340, 3940.10, -816.90, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3941.90, -816.90, 1873.00, 0.00, 0.00, 0.00);
CreateDynamicObject(2340, 3933.10, -837.90, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2340, 3935.00, -837.90, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2340, 3936.90, -837.90, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2340, 3939.00, -837.70, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2340, 3940.90, -837.90, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2340, 3942.60, -837.90, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(1208, 3935.00, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3933.20, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3936.80, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3939.00, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3940.80, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3942.50, -837.90, 1874.10, 0.00, 0.00, 3.99);
CreateDynamicObject(1208, 3940.10, -816.90, 1874.10, 0.00, 0.00, 181.99);
CreateDynamicObject(1208, 3941.90, -816.90, 1874.10, 0.00, 0.00, 181.99);
CreateDynamicObject(2390, 3941.70, -837.90, 1874.60, 0.00, 0.00, 186.00);
CreateDynamicObject(2390, 3939.90, -837.90, 1874.60, 0.00, 0.00, 180.00);
CreateDynamicObject(2390, 3938.00, -837.90, 1874.50, 0.00, 0.00, 179.99);
CreateDynamicObject(2390, 3935.90, -837.90, 1874.60, 0.00, 0.00, 179.99);
CreateDynamicObject(2390, 3934.10, -837.90, 1874.60, 0.00, 0.00, 179.99);
CreateDynamicObject(2390, 3933.90, -816.90, 1874.60, 0.00, 0.00, 359.99);
CreateDynamicObject(2390, 3935.70, -816.90, 1874.60, 0.00, 0.00, 359.99);
CreateDynamicObject(2390, 3937.40, -816.90, 1874.60, 0.00, 0.00, 359.99);
CreateDynamicObject(2390, 3939.30, -816.90, 1874.60, 0.00, 0.00, 359.99);
CreateDynamicObject(2390, 3940.90, -816.90, 1874.60, 0.00, 0.00, 359.99);
CreateDynamicObject(2689, 3942.60, -818.30, 1875.60, 0.00, 0.00, 274.00);
CreateDynamicObject(2689, 3942.60, -819.30, 1875.60, 0.00, 0.00, 274.00);
CreateDynamicObject(2704, 3942.60, -820.30, 1875.60, 0.00, 0.00, 284.00);
CreateDynamicObject(2704, 3942.60, -821.30, 1875.60, 0.00, 0.00, 284.00);
CreateDynamicObject(2705, 3942.60, -822.30, 1875.60, 0.00, 0.00, 278.00);
CreateDynamicObject(2705, 3942.60, -823.10, 1875.60, 0.00, 0.00, 278.00);
CreateDynamicObject(2706, 3942.60, -823.90, 1875.60, 0.00, 0.00, 282.00);
CreateDynamicObject(2706, 3942.60, -824.60, 1875.60, 0.00, 0.00, 282.00);
CreateDynamicObject(1808, 3932.30, -825.70, 1873.00, 0.00, 0.00, 92.00);
CreateDynamicObject(1808, 3932.30, -829.20, 1873.00, 0.00, 0.00, 92.00);
CreateDynamicObject(1828, 3934.20, -827.30, 1873.00, 0.00, 0.00, 182.00);
CreateDynamicObject(2391, 3942.60, -818.20, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2391, 3942.60, -819.30, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2396, 3942.60, -820.20, 1874.40, 0.00, 0.00, 270.00);
CreateDynamicObject(2396, 3942.60, -821.30, 1874.40, 0.00, 0.00, 270.00);
CreateDynamicObject(2398, 3942.60, -822.30, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2398, 3942.60, -823.20, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2399, 3942.60, -825.50, 1875.70, 0.00, 0.00, 274.00);
CreateDynamicObject(2399, 3942.60, -826.50, 1875.70, 0.00, 0.00, 274.00);
CreateDynamicObject(2401, 3942.60, -823.90, 1874.40, 0.00, 0.00, 270.00);
CreateDynamicObject(2401, 3942.60, -824.60, 1874.40, 0.00, 0.00, 270.00);
CreateDynamicObject(2374, 3942.60, -825.50, 1874.40, 0.00, 0.00, 276.00);
CreateDynamicObject(2374, 3942.60, -826.40, 1874.40, 0.00, 0.00, 276.00);
CreateDynamicObject(2377, 3942.60, -827.30, 1874.40, 0.00, 0.00, 280.00);
CreateDynamicObject(2377, 3942.60, -828.20, 1874.40, 0.00, 0.00, 280.00);
CreateDynamicObject(2378, 3942.60, -829.10, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2378, 3942.60, -830.00, 1874.40, 0.00, 0.00, 274.00);
CreateDynamicObject(2383, 3942.60, -827.40, 1875.70, 0.00, 0.00, 190.00);
CreateDynamicObject(2383, 3942.60, -828.20, 1875.70, 0.00, 0.00, 190.00);
CreateDynamicObject(2704, 3942.60, -829.20, 1875.70, 0.00, 0.00, 284.00);
CreateDynamicObject(2704, 3942.60, -830.10, 1875.70, 0.00, 0.00, 284.00);
CreateDynamicObject(997, 3933.90, -816.90, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3935.60, -816.90, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3937.40, -816.90, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3939.20, -816.90, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3940.90, -817.00, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3941.70, -835.00, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3940.00, -835.00, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3937.80, -835.00, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3935.90, -834.90, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(997, 3934.10, -835.00, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(1504, 3932.10, -827.40, 1873.00, 0.00, 0.00, 268.00);
CreateDynamicObject(1504, 3932.10, -827.40, 1873.00, 0.00, 0.00, 90.00);
CreateDynamicObject(1723, 3932.90, -831.90, 1873.00, 0.00, 0.00, 90.00);
CreateDynamicObject(1723, 3932.90, -825.00, 1873.00, 0.00, 0.00, 88.00);
CreateDynamicObject(2180, 3942.50, -830.70, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(2180, 3942.50, -832.60, 1873.00, 0.00, 0.00, 270.00);
CreateDynamicObject(2054, 3942.60, -830.40, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2054, 3942.60, -830.80, 1873.90, 0.00, 0.00, 340.00);
CreateDynamicObject(2054, 3942.60, -831.20, 1873.90, 0.00, 0.00, 330.00);
CreateDynamicObject(2054, 3942.60, -831.60, 1873.90, 0.00, 0.00, 330.00);
CreateDynamicObject(2054, 3942.60, -832.00, 1873.90, 0.00, 0.00, 330.00);
CreateDynamicObject(2054, 3942.60, -832.40, 1873.90, 0.00, 0.00, 330.00);
CreateDynamicObject(2054, 3942.60, -832.80, 1873.90, 0.00, 0.00, 330.00);
CreateDynamicObject(2053, 3942.20, -830.50, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2053, 3942.20, -830.90, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2053, 3942.20, -831.30, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2053, 3942.20, -831.70, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2053, 3942.20, -832.10, 1873.90, 0.00, 0.00, 0.00);
CreateDynamicObject(2052, 3942.30, -832.50, 1873.80, 0.00, 0.00, 0.00);
CreateDynamicObject(2052, 3942.30, -833.00, 1873.80, 0.00, 0.00, 0.00);
CreateDynamicObject(2053, 3932.90, -816.90, 1873.99, 0.00, 0.00, 0.00);
// Nueva Labanderia
CreateObject(4594, 995.05, -1351.37, 12.35, 0.00, 0.00, 89.50);
PD: Si lo creen necesario solo diganmelo, y añado al post la fuente.