30.07.2009, 14:31
pawn Код:
forward Party(playerid);
new partycolor[MAX_PLAYERS];
new partywanted[MAX_PLAYERS];
public Party(playerid)
{
if(partywanted[playerid] == 1)
{
if(ce[playerid] == 0)
{
ce[playerid] = 1;
SetPlayerWantedLevel(playerid,1);
}
else
if(ce[playerid] == 1)
{
ce[playerid] = 2;
SetPlayerWantedLevel(playerid,2);
}
else
if(ce[playerid] == 2)
{
ce[playerid] = 3;
SetPlayerWantedLevel(playerid,3);
}
else
if(ce[playerid] == 3)
{
ce[playerid] = 4;
SetPlayerWantedLevel(playerid,4);
}
else
if(ce[playerid] == 4)
{
ce[playerid] = 0;
SetPlayerWantedLevel(playerid,5);
}
}
if(partycolor[playerid] == 1)
{
if(ce[playerid] == 0)
{
ce[playerid] = 1;
SetPlayerColor(playerid,0x38FF06FF);
}
else
if(ce[playerid] == 1)
{
ce[playerid] = 2;
SetPlayerColor(playerid,0xFB0000FF);
}
else
if(ce[playerid] == 2)
{
ce[playerid] = 3;
SetPlayerColor(playerid,0xB360FDFF);
}
else
if(ce[playerid] == 3)
{
ce[playerid] = 4;
SetPlayerColor(playerid,0xCECECEFF);
}
else
if(ce[playerid] == 4)
{
ce[playerid] = 0;
SetPlayerColor(playerid,0xFFFF00FF);
}
}
return 1;
}
//OnPlayer Connect
partycolor[playerid] = 0;
partywanted[playerid] = 0;
//OnPlayerCommandText
if(strcmp(cmdtext, "/colorparty", true) == 0)
{
if(AccountInfo[playerid][unlock] >= 7)
{
if(partycolor[playerid] == 1)
{
if(partywanted[playerid] == 1)
{
partycolor[playerid] = 0;
}
else
KillTimer(timer1[playerid]);
partycolor[playerid] = 0;
}
else
if(partycolor[playerid] == 0)
{
if(partywanted[playerid] == 1)
{
partycolor[playerid] = 1;
}
else
timer1[playerid] = SetTimer("Party", 100, 1);
partycolor[playerid] = 1;
}
}
else
SendClientMessage(playerid,ADMIN_RED,"You need atleast 7 bombs to use this command.");
return 1;
}
if(strcmp(cmdtext, "/wantedparty", true) == 0)
{
if(AccountInfo[playerid][unlock] >= 10)
{
if(partywanted[playerid] == 1)
{
if(partycolor[playerid] == 1)
{
partywanted[playerid] = 0;
}
else
KillTimer(timer1[playerid]);
partywanted[playerid] = 0;
}
else
if(partywanted[playerid] == 0)
{
if(partycolor[playerid] == 1)
{
partywanted[playerid] = 1;
}
else
timer1[playerid] = SetTimer("Party", 100, 1);
partywanted[playerid] = 1;
}
}
else
SendClientMessage(playerid,ADMIN_RED,"You need 10 bombs to use this command.");
return 1;
}
well as the title says the wantedlevel and the player color only changes for id0 and not id1 and above....
anyone can help me? :/