[Include] dFunc - Simple Useful Functions
#1

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
Reply
#2

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.
Reply
#3

Oh sorry, so i edited it :S
Its my first releases here so i cant be pro
Reply
#4

Yea, its pretty simple just to copy others include, remove some functions, and add some.
First 25 lines say, its copyied from me.
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply
#8

Don't double post please. There's a modify/edit button - use it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)