transferMoney()

From Hack Wars Wiki

Jump to: navigation, search


Function information for transferMoney()
Function transferMoney(string ip,float amount)
API Watch
Cost $2,000
Level 40
CPU Usage 5
Description Transfers the amount indicated to the player represented by the IP.

Example

This example will transfer $1000 to the player with the IP 765.432.1.001.

transferMoney("765.432.1.001", 1000.0);

This example will transfer $20 to maker of script(hard coded ip) for leasing fees(this example is made for making leasing scripts)

int main(){
    if(checkPettyCash()>=20){
         transferMoney("900.800.6.000",20);
         //Rest of code here
    }else{
         message(getSourceIP(),"Not enough money to make lease payment.");
    }
}
Personal tools