![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | player, amount | Type: | void |
Give amount gold to player. Negative amounts subtract gold |
Example:
AddGold(0, 100); //gives the Barbarians 100 gold. |
tested
working
SFN_ERROR Slic_AddGold::Call(SlicArgList *args) { if(args->Count() != 2) return SFN_ERROR_NUM_ARGS; sint32 pl; if(!args->GetInt(0, pl)) return SFN_ERROR_TYPE_ARGS; sint32 amt; if(!args->GetInt(1, amt)) return SFN_ERROR_TYPE_ARGS; if(pl < 0 || pl >= k_MAX_PLAYERS) return SFN_ERROR_OUT_OF_RANGE; if(!g_player || !g_player[pl]) return SFN_ERROR_DEAD_PLAYER; if(amt >= 0) g_player[pl]->m_gold->AddGold(amt); else g_player[pl]->m_gold->SubGold(-amt); return SFN_ERROR_OK; } |
Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.
*) Required fields
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 96115 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |