View Single Post
Old 01/06/2017, 12:00 AM   #18
Join Date: Jun 2016
Posts: 156
Reputation: 8
Default Re: How to use "DestroyVehicle" whitout player in vehicle?

if(strcmp(cmdtext,"/fb", true, 3) == 0 && cmdtext[3] <= ' ') {
What if the command the user entered is just of 3 characters, just /fb, then the cmdtext[3] would crash, with an array index out of bounds exception. It's better to use sscanf for these purposes. NEVER TRUST USER INPUT.
ShihabSoft is offline   Reply With Quote