Functions - NicolasNeg/Samp-Functions GitHub Wiki

Welcome to the Samp-Functions wiki!


SetPlayerMoney

This function to give fixed money to the player, unlike GivePlayerMoney, does not add to him but if he has 1000 with SetPlayerMoney(playerid, 1500); the player's money will be 1500 not 2500.


SetPlayerHair

This function is to put a hair on the player, it is used in the following way: SetPlayerHair(playerid, hair_type, slot) the slot is the index, watch out for that (the hair type is integer 1-4)


CreateDialog

This function is created by textdraws, it is easy to use and it is by dialogids (integers)

CreateDialog(playerid, DIALOG_ID, DG_STYLE, DIALOG_CAPTION[], DIALOG_INFO[], DIALOG_BTN1[], DIALOG_BTN2[])

Callback: public OnPlayerDGResponse (playerid, response, DG_ID)


SetPlayerCash

This functions set player cash

SetPlayerCash(playerid, money)


GivePlayerCash

This function give player cash.

GivePlayerCash(playerid, money)


IsCashShowed

If the cash is showed return true or 1

IsCashShowed(playerid)


ResetPlayerCash

This function reset (to 0) the player cash.

ResetPlayerCash(playerid)


ShowCash

This function show the player cash (TD)

ShowCash(playerid)


HideCash

This function hide the player cash (TD)

HideCash(playerid)


Radio_State(playerid)

this function turn on the radio or turn off the radio


GetFreq(playerid)

This function return the freq of the playerid (Example: 12.0)


SendRadioMessage(playerid, Float: freq, const message[])

This function send the radio message to all the users have the same freq of the playerid


GetState(playerid)

This function return the state of the playerid freq (Example: FREQ_STATE_JOIN the playerid join a new freq)


SetFreq(playerid, Float: freq)

Set the frequence "freq". (Example: SetFreq(playerid, 13.5))


Other...

Ideas