16.01.2011, 21:56
hello i have this in my gamemod
i want make a area "(-934.23,1389.667,-572.2159,1658.25)" only in this area can i make a point for my team "SCC++;" how is wrong in my script what can i do ?
Code:
public OnPlayerDeath(playerid, killerid, reason) { if(gTeam[playerid]==TEAM_GG && IsPlayerInArea(-934.23,1389.667,-572.2159,1658.258)) { SendClientMessageToAll(0xFFB400FF, "Team 1 make a point!"); GivePlayerMoney(playerid, 100); SCC++; } if(gTeam[playerid]==TEAM_CC && IsPlayerInArea(-934.23,1389.667,-572.2159,1658.258)) { SendClientMessageToAll(0xFFB400FF, "Team 2 make a point!"); GivePlayerMoney(playerid, 100); SGG ++; } if(SCC==50) { for(new i=50; i < MAX_PLAYERS; i++) { GameTextForAll("~y~ Team 1 win",10000,3); ForceClassSelection(playerid); SCC=0; SGG=0; new string2[5]; valstr(string2, SCC); TextDrawSetString(TextCC, string2); valstr(string2, SGG); TextDrawSetString(TextGG, string2); } SendClientMessageToAll(0xFFB400FF,"**Team 1 win**"); } if(SGG==50) { for(new i=50; i < MAX_PLAYERS; i++) { GameTextForAll("~g~Team 2 win",10000,3); ForceClassSelection(playerid); SCC=0; SGG=0; new string3[5]; valstr(string3, SCC); TextDrawSetString(TextCC, string3); valstr(string3, SGG); TextDrawSetString(TextGG, string3); } SendClientMessageToAll(0x00FF14FF,"** Team 2 win **"); } if(killerid != INVALID_PLAYER_ID) { SetPlayerScore(killerid, GetPlayerScore(killerid)); } return 1; }