Szasztok
Csináltam egy ciggy szkriptet, amit ha elszív, akkor be lessz állva.
Drunk level + furcsa weatherek
De valamiért nem akar mûködni :( :(
new RandWeirdWeathers[][] = {
{21},
{23},
{33},
{43},
{38},
{44},
{45},
{47},
{50},
{100},
{250},
{2009}
};
CMD:ciggy(playerid)
{
if(pParams[playerid][ciggy] == false)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
SendClientMessage(playerid, COLOR_VILZOLD, \"** Gratulálok, cigizel :) Ha nem szeretnéd tovább rontani a tüdõdet, akkor ird be újra a parancsot!\");
pParams[playerid][ciggy] = true;
}
else if(pParams[playerid][ciggy] == true)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
pParams[playerid][ciggy] = false;
KillTimer(CiggyWeatherTimer(playerid));
}
return 1;
}
OnPlayerUpdate:
new fire;
new ud;
new lr;
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
{
if(GetPlayerKeys(playerid, fire, ud, lr) == KEY_FIRE)
{
SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+100);
}
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
{
if(GetPlayerKeys(playerid, fire, ud, lr) == KEY_FIRE)
{
SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid)+100);
SetTimerEx(\"CiggyWeatherTimer\", 1000, true, \"i\", playerid);
}
}
public CiggyWeatherTimer(playerid)
{
SetPlayerWeather(playerid, random(sizeof(RandWeirdWeathers)));
}
????
Tess, ez 10 másodpercenként változtatja
new CiggyTimer[MAX_PLAYERS];
public OnPlayerDisconnect(playerid)
{
if(pParams[playerid][ciggy])
KillTimer(CiggyTimer[playerid]);
return 1;
}
CMD:ciggy(playerid)
{
if(pParams[playerid][ciggy] == false)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
SendClientMessage(playerid, COLOR_VILZOLD, \"** Gratulálok, cigizel :) Ha nem szeretnéd tovább rontani a tüdõdet, akkor ird be újra a parancsot!\");
pParams[playerid][ciggy] = true;
CiggyTimer[playerid] = SetTimerEx(\"CiggyWeatherTimer\", 10*1000, false, \"i\", playerid);
}
else if(pParams[playerid][ciggy] == true)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
pParams[playerid][ciggy] = false;
KillTimer(CiggyTimer[playerid]);
}
return 1;
}
argument type mismatch (argument 2)
erre:
SetPlayerWeather(playerid, RandWeirdWeathers[rand]);