CREATE TABLE `YOUR_PORT_HERE`.`ShotRecords`(
`ID` INT(15) NOT NULL AUTO_INCREMENT ,
`Name` VARCHAR(25) NOT NULL ,
`Chest` INT(11) NOT NULL ,
`Torso` INT(11) NOT NULL ,
`LeftArm` INT(11) NOT NULL ,
`RightArm` INT(11) NOT NULL ,
`LeftLeg` INT(11) NOT NULL ,
`RightLeg` INT(11) NOT NULL ,
`Head` INT(11) NOT NULL ,
`Missed` INT(15) NOT NULL ,
PRIMARY KEY (`ID`))
ENGINE = InnoDB;
if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_CHEST) { pInfo[issuerid][Chest] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_TORSO) { pInfo[issuerid][Torso] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_LEFT_ARM) { pInfo[issuerid][LeftArm] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_RIGHT_ARM) { pInfo[issuerid][RightArm] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_LEFT_LEG) { pInfo[issuerid][LeftLeg] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_RIGHT_LEG) { pInfo[issuerid][RightLeg] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_HEAD) { pInfo[issuerid][Head] += 1; }
if(issuerid != INVALID_PLAYER_ID) { switch(bodypart) { case WEAPON_BODY_PART_CHEST: pInfo[issuerid][Chest] += 1; case WEAPON_BODY_PART_TORSO: pInfo[issuerid][Torso] += 1; case WEAPON_BODY_PART_LEFT_ARM: pInfo[issuerid][LeftArm] += 1; case WEAPON_BODY_PART_RIGHT_ARM: pInfo[issuerid][RightArm] += 1; case WEAPON_BODY_PART_LEFT_LEG: pInfo[issuerid][RightLeg] += 1; case WEAPON_BODY_PART_RIGHT_LEG: pInfo[issuerid][LeftLeg] += 1; case WEAPON_BODY_PART_HEAD: pInfo[issuerid][Head] += 1; } }
Why the code looks so messed up at GitHub? I had the same problem 2 days ago, there must be a fix for it
|
Don't upload the .pwn file directly from your PC to the GitHub repository, Follow these steps;
or simply, if you use Sublime Text 3, Open 'View' -> 'Line Endings' -> 'Unix' then save it and upload it to the repository. |
What is this bullshit?
Code:
if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_CHEST) { pInfo[issuerid][Chest] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_TORSO) { pInfo[issuerid][Torso] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_LEFT_ARM) { pInfo[issuerid][LeftArm] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_RIGHT_ARM) { pInfo[issuerid][RightArm] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_LEFT_LEG) { pInfo[issuerid][LeftLeg] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_RIGHT_LEG) { pInfo[issuerid][RightLeg] += 1; } if(issuerid != INVALID_PLAYER_ID && bodypart == WEAPON_BODY_PART_HEAD) { pInfo[issuerid][Head] += 1; } Code:
if(issuerid != INVALID_PLAYER_ID) { switch(bodypart) { case WEAPON_BODY_PART_CHEST: pInfo[issuerid][Chest] += 1; case WEAPON_BODY_PART_TORSO: pInfo[issuerid][Torso] += 1; case WEAPON_BODY_PART_LEFT_ARM: pInfo[issuerid][LeftArm] += 1; case WEAPON_BODY_PART_RIGHT_ARM: pInfo[issuerid][RightArm] += 1; case WEAPON_BODY_PART_LEFT_LEG: pInfo[issuerid][RightLeg] += 1; case WEAPON_BODY_PART_RIGHT_LEG: pInfo[issuerid][LeftLeg] += 1; case WEAPON_BODY_PART_HEAD: pInfo[issuerid][Head] += 1; } } |
Don't upload the .pwn file directly from your PC to the GitHub repository, Follow these steps;
Open your repository -> Click 'Create new file' -> Name your file and at the end of the name put .pwn -> Copy your script and paste it in the new file you made. or simply, if you use Sublime Text 3, Open 'View' -> 'Line Endings' -> 'Unix' then save it and upload it to the repository. Though, I believe there are other simpler ways. OT: Simple, But there are few things you should note on, such as the string defines in the command and Pottus post. |