[Include] g_utilities - New functions for your server
#1

Basically, this is an include that add many functions, im going to explain all the functions.

pawn Код:
GetName(playerid);
This function get the name of a player without make a var


pawn Код:
GetPlayerID(const nombre[]);
For those people that not use strtok or sccanf, this is going to add the name like parameter (To combine with IsNumeric)


pawn Код:
GetNearestCar(playerid);
This function get the ID of the nearest vehicle


pawn Код:
GetDistanceBetweenTwoPlayers(player1, player2, &Float:x, &Float:y, &Float:z);
This function get the distance between 2 players and save it in floats.


pawn Код:
SendErrorMessage(playerid, message[]);
This function is the same that SendClientMessage but add '[Error]' before the text


pawn Код:
ExplodeAll(type, Float:radio);
This function explode all players in a radius


pawn Код:
RemovePlayerHealth(playerid, Float:resta);
This function discount health of a player, if a player have 100 and you discount 30, they will have 70.


pawn Код:
RemovePlayerArmour(playerid, Float:resta);
This function discount armour of a player, if a player have 100 and you discount 30, they will have 70.


pawn Код:
AddPlayerHealth(playerid, Float:suma);
This function add health for a player, if a player have 60 and you add 20 they will have 80


pawn Код:
AddPlayerArmour(playerid, Float:suma);
This function add armour for a player, if a player have 60 and you add 20 they will have 80


pawn Код:
GetPlayerxPos(playerid);
Get the X position of a player


pawn Код:
GetPlayeryPos(playerid);
Get the Y position of a player


pawn Код:
GetPlayerzPos(playerid);
Get the Z position of a player


pawn Код:
SendClientFormattedMessage(playerid, color, const msg[]);
This function is the plus of format + SendClientMessage
Example:
pawn Код:
SendClientFormattedMessage(playerid, 0xFF0000FF, "Your name is %s", GetName(playerid));


pawn Код:
SendClientFormattedMessageToAll(color, const msg[])
The same but to all the server



Note: If you look at the script, you probably find functions that aren't in the list, this is because some functions aren't complete, im going to release another version with more functions.

Thank you for reading, regards, Goncho28 from the Spanish section.

Reply


Messages In This Thread
g_utilities - New functions for your server - by Goncho28 - 24.10.2015, 03:48
Re: g_utilities - New functions for your server - by Crayder - 24.10.2015, 06:57
Re: g_utilities - New functions for your server - by Detoria - 26.10.2015, 02:31

Forum Jump:


Users browsing this thread: 1 Guest(s)