Posts: 481
Threads: 19
Joined: Feb 2012
19.06.2013, 14:07
(
Последний раз редактировалось dEcooR; 19.06.2013 в 14:46.
)
•dFunc v1.0•
Hello,i want to preview my useful functions as include,i hope that i will help someone.
Just use this at top of your script/gamemode
#include <dfunc>
Functions:
Код:
PlayerName(playerid)
GivePlayerHealth(playerid,health)
GivePlayerArmour(playerid,armour)
GivePlayerScore(playerid,score)
GetPlayerHP(playerid) - (now you dont have to use new hp; getplayerhp)
GetPlayerARM(playerid)
IsVehicleBike(vehicleid)
GetVehSpeed(vehicleid)
GetPlayerSpeed(playerid)
Fuck(playerid)
IsPlayerAiming(playerid)
IsPlayerInZone(playerid,x_min,y_min,x_max,y_max)
SendMessageToAdmins(color,message)
GetWeaponSlot(weaponid)
PlayAudioStreamForAll(url)
GetPlayerIP(playerid)
IsPlayerInWater(playerid)
Download: PASTEBIN
I hope that some stocks really help someone peoples,and i know that here are many this functions but 1+ is okay
PS: Sorry my english is too bad
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Just a few tips on naming your functions:
- Don't use abbreviations unless absolutely required (SendMessAdmins and GetArm).
- Make sure your function names describe fully what they do: GiveHealth - Give health to what? GivePlayerHealth.
- IsPlayerAim - ing..
- Fuck(playerid, reason) - nice.
You don't actually explain what any of these do. Albeit the majority of them are self-explanatory..
Also, there's no such thing as 'stocks'. People say that because of the 'stock' keyword. They are FUNCTIONS, that use the stock keyword.
IsPlayerInZone(playerid) - what zone? There's only a playerid parameter!
GetPlayerIP - This already exists..?
SendMessAdmins - I assume this is for RCON? Nobody uses RCON really..
But yeah, nice effort.
Posts: 481
Threads: 19
Joined: Feb 2012
Oh sorry, so i edited it :S
Its my first releases here so i cant be pro
Posts: 57
Threads: 12
Joined: Nov 2012
Reputation:
0
Yea, its pretty simple just to copy others include, remove some functions, and add some.
First 25 lines say, its copyied from me.
Posts: 2,698
Threads: 37
Joined: Mar 2012
Reputation:
0
Haha, the "Fuck(playerid)" function looks hilarious! However, the "BiebersMOM" could be changed as it wouldn't work well if another player is having that name. Better create an array of names and then set it up. Nice start though, add more stuffs and optimize the current codes if you're updating.
Posts: 481
Threads: 19
Joined: Feb 2012
Quote:
Originally Posted by RACGaming
Yea, its pretty simple just to copy others include, remove some functions, and add some.
First 25 lines say, its copyied from me.
|
yes of course because only you know that lol
Posts: 481
Threads: 19
Joined: Feb 2012
Quote:
Originally Posted by Lordz™
Haha, the "Fuck(playerid)" function looks hilarious! However, the "BiebersMOM" could be changed as it wouldn't work well if another player is having that name. Better create an array of names and then set it up. Nice start though, add more stuffs and optimize the current codes if you're updating.
|
yea i will maybe if my time will be free