14.01.2013, 12:01
Hi, i need help in my job system. It will be a very simple script.
The player can use /jobs to choose the job what he want. And then he get a car and new skin. And he earn 750 dollars every 5 minutes.
this is the timer:
This is the command: (zcmd)
this is the response:
So, how should I connect the timer to the money?
I hope you can help me! Thanks.
The player can use /jobs to choose the job what he want. And then he get a car and new skin. And he earn 750 dollars every 5 minutes.
this is the timer:
Код:
SetTimer("paytime", 10000, true);
Код:
CMD:jobs(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Choose one!","police man \nFireman\nsomething","ok","cancel"); return 1; }
Код:
{ if(dialogid == DIALOG_1) { if(response == 1) { switch(listitem) { case 0: // This case is the important!!! { static Float: pX, Float: pY, Float: pZ; GetPlayerPos( playerid, pX, pY, pZ ); CreateVehicle( 522, pX + 2.0, pY + 2.0, pZ, 0.0, -1, -1, 1000 ); SendClientMessage(playerid, 0x38FF06FF, "Now, you are a Police man" ); // I NEED HELP HERE ... GivePlayerMoney(playerid, 750); } case 1: { static Float: pX, Float: pY, Float: pZ; GetPlayerPos( playerid, pX, pY, pZ ); CreateVehicle( 562, pX + 2.0, pY + 2.0, pZ, 0.0, -1, -1, 1000 ); SendClientMessage(playerid, 0x38FF06FF, "not important!" ); } case 2: { static Float: pX, Float: pY, Float: pZ; GetPlayerPos( playerid, pX, pY, pZ ); CreateVehicle( 520, pX + 2.0, pY + 2.0, pZ, 0.0, -1, -1, 1000 ); SendClientMessage(playerid, 0x38FF06FF, "asd!" ); } } } else { SendClientMessage(playerid, 0xEB000FFF, "Cancelled :("); } return 1; } return 1; }
I hope you can help me! Thanks.