Search Results
I found the answer in this thread. https://sampforum.blast.hk/showthread.php?tid=419858
61
Hi. Having a problem with storing results of cache_get_row into my array. Here is what I'm doing. Код: enum example { logUserid, logText[8] }; new Example[MAX_PLAYERS][example]; public OnPlayerC...
61
They're effectively the exact same thing.
131
Код: if (response != 1) { return Kick(playerid); }
131
Don't store anything in the player's variables. What I do. Код: enum vehEnum { vehEntity, vehID, vehOwnerID }; new Vehicle[MAX_VEHICLES][vehEnum]; Then load up the array with your vehicle data in...
168
How do you keep track of players who have joined event? Do you add them to an array of any kind, or just teleport them to an area and that means they're in the event?
69
https://sampforum.blast.hk/showthread.php?tid=190068 This is what I use.
74
Just curious why you're constantly setting the username? I would remove username='%s', entirely since you're likely not actually updating it, especially since you're looking FOR that username.. Just s...
248
Everyone else got to it, but you have the comma inside of the quotes in this line: Код: if(strcmp("Jay_Dixon,"playername, true, 10) == 0) Also as stated, I would remove the 10. I also like writin...
145
I have not tried benchmarking, I probably should. Thanks for the link. Hey, I see your response below this post. Thank you very much for your input. Very much appreciated. +rep'd!
127
What if I did have thousands of houses? How would you recommend future-proofing this script? Are there things I can do to make sure that we're as quick & efficient as possible? NEW QUESTION: I ...
127
So, my gamemode currently uses quite a few loops (as necessary) to find & use relations between arrays. For example, I preload HomeInfo[MAX_HOMES][enum] during OnGameModeInit() from a database, a...
127
Just for anybody searching for this in the future pertaining to MySQL queries with left joins that may result in NULL results (by design) look into the MySQL query function COALESCE (usage: COALESCE(c...
72
I actually read about it yesterday (the "e" specifier) as I was scouring your documentation and have since started making the switch, however I thought I read it wasn't compatible with multi-dimension...
72
You can't remove a single weapon. What you'll need to do is find out all of the player's current weapons using GetPlayerWeaponData add the weapons he has into an array. Then use GetPlayerWeapon to co...
98
Add \n to the end of each line string where you want it to go to the next line. Код: #define DIALOG_SHOW_INFO 13337 CMD:ahelp(playerid, params[]) { new FUCKSAMstr[3000]; new alevel = PlayerInf...
111
You're querying the database, but you're not doing anything with the results. mysql_store_result(); mysql_fetch_row(); mysql_free_result(); Look into those commands, or the alternatives for your MyS...
71
Код: new currentHour = GetCurrentHour() This is him getting the number of the hour (so if it's 2:00AM it returns 2, if it's 11:33AM it returns 11) Код: stock GetCurrentHour() { new curren...
63
Where is cmd (the variable) getting it's definition? strcmp will return a "0" if either string it's comparing is empty.
58