23.12.2013, 10:04
Down the Code .... As im trying to make the vehicles restriced for an ammount of score
Up the Code
Код:
//============================================================================== //============================[ OnPlayerEnter and OnPlayerLeave Dynamic CP]===== //============================================================================== public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new Float:p[3],model = GetVehicleModel(vehicleid); if(model == 432&&GetPlayerScore(playerid)<1500) { GetPlayerPos(playerid,p[0],p[1],p[2]); SetPlayerPos(playerid,p[0],p[1],p[2]); SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1500 scores or Being a VIP Member to drive this vehicle!"); } if(model == 425&&GetPlayerScore(playerid)<1200) { GetPlayerPos(playerid,p[0],p[1],p[2]); SetPlayerPos(playerid,p[0],p[1],p[2]); SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1200 scores or Being a VIP Member to drive this vehicle!"); } if(model == 520&&GetPlayerScore(playerid)<1200) { GetPlayerPos(playerid,p[0],p[1],p[2]); SetPlayerPos(playerid,p[0],p[1],p[2]); SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1200 scores or Being a VIP Member to drive this vehicle!"); } if(model == 447&&GetPlayerScore(playerid)<1000) { GetPlayerPos(playerid,p[0],p[1],p[2]); SetPlayerPos(playerid,p[0],p[1],p[2]); SendClientMessage(playerid,COL_BLUE,"[ERROR]:You need to have atleast 1000 scores or Being a VIP Member to drive this vehicle!"); } return 1; } public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(checkpointid == CP[SNAKE]) { if(IsLogged[playerid] == 1) { if(UnderAttack[SNAKE] == 0) { if(Team[playerid] != MERCENARY) { if(tCP[SNAKE] != Team[playerid]) { CountVar[playerid][SNAKE] = 25; ActiveSnakeFarm(playerid); } else return SendClientMessage(playerid, -1,"*"COL_WHITE"This zone is already captured by your team."); } else return CaptureZoneMessage(playerid, 3); } else return CaptureZoneMessage(playerid, 2); } else return 0; } else if(checkpointid == CP[BAY]) { if(IsLogged[playerid] == 1) { if(UnderAttack[BAY] == 0) { if(Team[playerid] != MERCENARY) { if(tCP[BAY] != Team[playerid]) { CountVar[playerid][BAY] = 25; ActiveBay(playerid); } else return SendClientMessage(playerid, -1,"*"COL_WHITE"This zone is already captured by your team."); } else return CaptureZoneMessage(playerid, 3); } else return CaptureZoneMessage(playerid, 2); } else return 0; }
Код:
new str[128]; format(str, sizeof(str),""COL_RED" %s "COL_WHITE"has captured \"Big Ear\" for team %s", PlayerName(playerid), GetTeamName(playerid)); SendClientMessageToAll(-1, str); return 1; } stock LeavingEar(playerid) { for(new num = 0; num < 4; num ++) { TextDrawHideForPlayer(playerid, ZoneTextdraw_[num][playerid]); } Captured[playerid][EAR] = 1; UnderAttack[EAR] = 0; KillTimer(timer[playerid][EAR]); CountVar[playerid][EAR] = 25; GangZoneStopFlashForAll(Zone[EAR]); for(new i = 0; i < MAX_PLAYERS; i++) { IsPlayerCapturing[i][EAR] = 0; } SendClientMessage(playerid, -1,"*"COL_WHITE"You have been failed to capture this zone."); PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3"); return 1; } forward BigEar(playerid); public BigEar(playerid) { EarCaptured(playerid); return 1; }