14.03.2013, 18:34
I have nothing in the script than what I described above! A being a possible problem in SetPlayerCriminal?
Код:
public SetPlayerCriminal(playerid,declare,reason[]) {//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); if(IsPlayerConnected(playerid)) { PlayerInfo[playerid][pCrimes] += 1; new points = WantedPoints[playerid]; new turned[MAX_PLAYER_NAME]; new turner[MAX_PLAYER_NAME]; new turnmes[128]; new wantedmes[128]; new wlevel; strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255); GetPlayerName(playerid, turned, sizeof(turned)); if (declare == 255) { format(turner, sizeof(turner), "Unknown"); strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255); } else { if(IsPlayerConnected(declare)) { GetPlayerName(declare, turner, sizeof(turner)); strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255); strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255); strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255); } } format(turnmes, sizeof(turnmes), "You've commited a Crime ( %s ). Reporter: %s.",reason,turner); SendClientMessage(playerid, COLOR_1RED, turnmes); new wanted = GetPlayerWantedLevel(playerid); SetPlayerWantedLevel(playerid, wanted +1); if(points > 0) { new yesno; if(points == 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1;} else if(points == 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1;} else if(points == 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1;} else if(points == 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1;} else if(points == 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1;} else if(points == 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1;} if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } } SetTimerEx( "dLevel", (600*1000), true, "d", playerid ); OnPlayerUpdate(playerid); if(yesno) { format(wantedmes, sizeof(wantedmes), "Current Wanted Level: %d", wlevel); SendClientMessage(playerid, COLOR_YELLOW, wantedmes); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMembru] == 1||PlayerInfo[i][pLider] == 1 || PlayerInfo[i][pMembru] == 2||PlayerInfo[i][pLider] == 2) { format(cbjstore, sizeof(turnmes), "HQ: All Units APB: Reporter: %s",turner); SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore); format(cbjstore, sizeof(turnmes), "HQ: Crime: %s, Suspect: %s",reason,turned); SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore); } } } } } }//not connected }