18.03.2011, 12:09
Hi all!
Well, im trying to make a payday system, and im not sure if this will work.
The code:
(Im from argentina :B)
Thank u all!
Well, im trying to make a payday system, and im not sure if this will work.
The code:
pawn Код:
public Payday(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
pInfo2[i][Exp] = pInfo2[i][Exp] + 1;
if(pInfo[playerid][Nivel] < 1)
{
if(pInfo2[playerid][Exp] >= 15)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 2");
}
}
else if(pInfo[playerid][Nivel] < 2)
{
if(pInfo2[playerid][Exp] >= 30)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 3");
}
}
else if(pInfo[playerid][Nivel] < 3)
{
if(pInfo2[playerid][Exp] >= 60)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 4");
}
}
else if(pInfo[playerid][Nivel] < 4)
{
if(pInfo2[playerid][Exp] >= 90)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 5");
}
}
else if(pInfo[playerid][Nivel] < 5)
{
if(pInfo2[playerid][Exp] >= 120)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 6");
}
}
else if(pInfo[playerid][Nivel] < 6)
{
if(pInfo2[playerid][Exp] >= 150)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 7");
}
}
else if(pInfo[playerid][Nivel] < 7)
{
if(pInfo2[playerid][Exp] >= 180)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 8");
}
}
else if(pInfo[playerid][Nivel] < 8)
{
if(pInfo2[playerid][Exp] >= 210)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 9");
}
}
else if(pInfo[playerid][Nivel] < 9)
{
if(pInfo2[playerid][Exp] >= 240)
{
pInfo2[playerid][Exp] = 0;
pInfo[playerid][Nivel] ++;
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[Info]Subiste un nivel! Ahora eres nivel 10");
}
}
SendClientMessage(i, COLOR_LIGHTGREEN, "[Payday]Recibiste 1 de experiencia por el Payday!");
SetPlayerScore(playerid, pInfo[playerid][Nivel]);
}
return 1;
}
Thank u all!