06.10.2012, 17:48
Hello
I have code that I want to change it.
Code belongs to clan ware
So that way.
My code says that you're Team A kills player on Team B - it will point right?
So what I want to do it with all Team A died, so then it would increase the point ..
And a gift, then it will Spec mode on one of the players who have not died ..
So I have two orders, one of which operates as a task, and one Admin operator.
So I have some things I want to change.
One. Instead ClanWar activity will be Admin activity - I want to do it to be like this, click Admin makes such a command called SetPlayerTeam (Ste /) and put a team player admin set.
For example like this.
Ste ID Teamid /
TeamID = Team_A | Team_B not Define these in this new Team_B [MAX_PLAYERS]; That's me.
So we continue.
Two. I have a Text Draw - now I want it more than by Raondim - for example Team_B IS Dead = 1 To Team_A
Now I will give you my codes.
These codes of ClansWar TextDraw OnPlayerDeath
By the way. Public On Player Death Michelina problem.
I do not know why it is not up rules of the points ..
Codes:
Plesae help me with the code's igot alot warnings - and i dont know how to change it to rounds ;(
I have code that I want to change it.
Code belongs to clan ware
So that way.
My code says that you're Team A kills player on Team B - it will point right?
So what I want to do it with all Team A died, so then it would increase the point ..
And a gift, then it will Spec mode on one of the players who have not died ..
So I have two orders, one of which operates as a task, and one Admin operator.
So I have some things I want to change.
One. Instead ClanWar activity will be Admin activity - I want to do it to be like this, click Admin makes such a command called SetPlayerTeam (Ste /) and put a team player admin set.
For example like this.
Ste ID Teamid /
TeamID = Team_A | Team_B not Define these in this new Team_B [MAX_PLAYERS]; That's me.
So we continue.
Two. I have a Text Draw - now I want it more than by Raondim - for example Team_B IS Dead = 1 To Team_A
Now I will give you my codes.
These codes of ClansWar TextDraw OnPlayerDeath
By the way. Public On Player Death Michelina problem.
I do not know why it is not up rules of the points ..
Codes:
PHP код:
OnGAmeModeInit = TextDraw ..
new str[27];
format(str,27,"Red Team - %d", ASc); ASc = TextDrawCreate(16.000000, 260.000000,str);
TextDrawFont(ASc, 3);
TextDrawLetterSize(ASc, 0.3, 3.5);
TextDrawColor(ASc, 0xff0000FF);
TextDrawSetOutline(ASc, false);
TextDrawSetProportional(ASc, true);
TextDrawSetShadow(ASc, 1);
format(str,27,"Blue Team - %d", BSc); BSc = TextDrawCreate(16.000000, 290.000000,str);
TextDrawFont(BSc, 3);
TextDrawLetterSize(BSc, 0.3, 3.5);
TextDrawColor(BSc, 0x00d9ffFF);
TextDrawSetOutline(BSc, false);
TextDrawSetProportional(BSc, true);
TextDrawSetShadow(BSc, 1);
PHP код:
OnPlayerDeath = Score - i Got Alot Warning and idont know why.
new StrSc[256];
if(Team_A[playerid] & Team_A[killerid])
{
SendClientMessageToAll(0xFF0000FF,"чбецд а' тщъд ийн чйм млп йшгд мдн рчегд");
if(ASc == 0)
{
ASc = 1;
}
return ASc--,format(StrSc,sizeof(StrSc),"TextDrawShowForAll(Text:ASc)");
if(Team_B[playerid] & Team_B[killerid])
{
SendClientMessageToAll(0xFF0000FF,"чбецд б' тщъд ийн чйм млп йшгд мдн рчегд");
if(BSc == 0)
BSc = 1;
}
return BSc--,format(StrSc,sizeof(StrSc),"TextDrawShowForAll(Text:BSc)");
}
if(Team_A[killerid] & Team_B[playerid])
{
return ASc++,format(StrSc,sizeof(StrSc),"TextDrawShowForAll(Text:ASc)");
}
if(Team_B[killerid] & Team_A[playerid])
{
return BSc++,format(StrSc,sizeof(StrSc),"TextDrawShowForAll(Text:BSc)");
}
PHP код:
OnPlayerCommand - The Admin And The Normal Player command to start CW and join -
new idx,cmd[255],tmp[256];
cmd = strtok(cmdtext,idx);
if(Team_A[playerid] == 1)return SendClientMessage(playerid,COLOR_RED,"аъд роца лшвт бчмап еаш аъд ма йлем мдщъощ бфчегеъ");
if(Team_B[playerid] == 1)return SendClientMessage(playerid,COLOR_RED,"аъд роца лшвт бчмап еаш аъд ма йлем мдщъощ бфчегеъ");
if(strcmp(cmd, "/JCw" ,true)==0)
{
tmp = strtok(cmdtext,idx);
if(Team_A[playerid] == 1)return SendClientMessage(playerid,0xFF0000FF,"аъд лбш ощъъу");
if(Team_B[playerid] == 1)return SendClientMessage(playerid,0xFF0000FF,"аъд лбш ощъъу");
if(CwEnter == 0)return SendClientMessage(playerid,0xFF0000FF,"фтймеъ дчмап еаш ма фетмъ");
if(!strlen(tmp))return SendClientMessage(playerid,0xFF0000FF,"/JCw [1-2]");
if(!IsNumber(tmp))return SendClientMessage(playerid,0xFF0000FF,"/JCw [1-2]");
if(strval(tmp) == 1)
{
Team_A[playerid] = 1;
SendClientMessage(playerid,0xFF9900FF,"дцишфъ мчбецд а' дагеод бдцзмд");
}
if(strval(tmp) == 2)
{
Team_B[playerid] = 1;
SendClientMessage(playerid,COLOR_BLUE,"дцишфъ мчбецд б' длземд бдцмзд");
}
CwMembers ++;
return 1;
}
if(strcmp(cmdtext, "/SCw" ,true)==0)
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"аъд ма агойп шащй");
CdTime = 30;
SetTimer("JCW",30000,0);
CwEnter = 1;
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]мдцишфеъ дчщ /JCw 1-2 ;)");
SendClientMessageToAll(0xF6F6F6AA,"[CW_Activy]ойгт: фтймеъ бйп 2 чбецеъ щрмзоеъ омзоъ чмап ееаш.");
SendClientMessageToAll(0xFF9900FF,"[CW_Activy]бдцмзд мощъъфйн , очеейн щъдре :) ");
SetTimer("CWcd",1000,0);
CwMembers = 0;
return 1;
}
PHP код:
Cw Public's:
public CwTimE()
{
if(ASc > BSc)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Team_A[i] == 1)
{
GivePlayerMoney(i,75000);
}
}
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
SendClientMessageToAll(0xFF0000FF,"лм длбег !!! чбецд а' дагеод рцзд аъ дчмап еаш");
}
if(BSc > ASc)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Team_B[i] == 1)
{
GivePlayerMoney(i,75000);
}
}
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
SendClientMessageToAll(COLOR_BLUE,"лм длбег !!! чбецд б' длземд рцзд аъ дчмап еаш");
}
if(ASc == BSc)
{
SendClientMessageToAll(0xFF9900FF,"чшд ъйче бйп щъй дчбецеъ рсе бфтн дбад");
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
Team_A[i] = 0;
Team_B[i] = 0;
SpawnPlayer(i);
}
ASc = 0;
BSc = 0;
return 1;
}
public JCW()
{
if(CwMembers < 1)return SendClientMessageToAll(0xFF0000FF,"фтймеъ дчмап ма йлемд мдъзйм тн фзеъ о2 щзчрйн"),CwEnter = 0,CwMembers = 0;
CwEnter = 0;
SetTimer("CwTimE",500000,0);
SendClientMessageToAll(0x00FFFFFF,"фтймеъ дчмап еаш дзмд джоп мдцъшфеъ ажм");
SendClientMessageToAll(0x00FF00FF,"йщ млн 500 щрйеъ мрцз");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Team_A[i] == 1)
{
SpawnPlayer(i);
ResetPlayerWeapons(i);
GivePlayerWeapon(i,26,9999);
GivePlayerWeapon(i,28,9999);
GivePlayerWeapon(i,22,9999);
SetPlayerColor(i,COLOR_DARKRED);
SetPlayerPos(i,-1203.8551,-226.8619,14.4703);
return 1;
}
if(Team_B[i] == 1)
{
SpawnPlayer(i);
ResetPlayerWeapons(i);
GivePlayerWeapon(i,26,9999);
GivePlayerWeapon(i,28,9999);
GivePlayerWeapon(i,22,9999);
SetPlayerColor(i,COLOR_BLUE);
SetPlayerPos(i,-1369.6040,-79.8589,14.4703);
return 1;
}
}
return 1;
}
public CWcd()
{
new CdTime;
CdTime = CdTime2;
CdTime2 = CdTime-1;
new cdS[256];
format(cdS,sizeof(cdS),"%d /JCw",CdTime);
GameTextForAll(cdS,1000,4);
if(CdTime > 1)
{
SetTimer("CWcd",1000,0);
}
return 1;
}
public CWin(type)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
switch(type){
case 1:{
if(Team_A[i] == 1)
{
GivePlayerMoney(i,75000);
}
}
case 2:{
if(Team_B[i] == 1)
{
GivePlayerMoney(i,75000);
}
}
}
Team_A[i] = 0;
Team_B[i] = 0;
}
return 1;
}
stock SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,Float:a)
{
SetPlayerPos(playerid , x , y ,z);
SetPlayerFacingAngle(playerid,a);
return 1;
}
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
stock IsNumber(const string[]) {
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++) {
if (
(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')
|| (string[i]=='-' && i!=0) //
|| (string[i]=='+' && i!=0) //
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}
stock IsNumeric(const string[]) {
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++) {
if (
(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')
|| (string[i]=='-' && i!=0) //
|| (string[i]=='+' && i!=0) //
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}