08.10.2012, 17:37
if(!strcmp(cmdtext,"/sendmoney",true))
{
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT, "Send Money","Enter the ID of the Player you want to Send Money","Okay","Cancel");
return 1;
}
Public OnDialogResponse
if(dialogid==1234&&response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT, "Send Money","Put the ID Of the Player You want to Send Money","Okay","Cancel");
if((GetTickCount()-WaitTimeForCMD[playerid])>60000)return SendClientMessage(playerid,COLOR_RED,"ERROR: You can send only 1 time's per 1 Minute.");
new level;
if((level < 1) || (level > 100000)) return SendClientMessage(playerid,0xFF0000AA,"The MAXIMUM Cash Amount is 1$ - 500.000$);
para[playerid]=strval(inputtext);
ShowPlayerDialog(playerid,1235,DIALOG_STYLE_INPUT, "Send Money","Enter the Cash Amount","Okay","Cancel");
}
if(dialogid==1235&&response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,1235,DIALOG_STYLE_INPUT, "Send Money","Enter the Amount","Okay","Cancel");
GivePlayerMoney(playerid,-strval(inputtext));
GivePlayerMoney(para[playerid],strval(inputtext));
WaitTimeForCMD[playerid]=GetTickCount();
para[playerid]=INVALID_PLAYER_ID;
}
{
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT, "Send Money","Enter the ID of the Player you want to Send Money","Okay","Cancel");
return 1;
}
Public OnDialogResponse
if(dialogid==1234&&response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,1234,DIALOG_STYLE_INPUT, "Send Money","Put the ID Of the Player You want to Send Money","Okay","Cancel");
if((GetTickCount()-WaitTimeForCMD[playerid])>60000)return SendClientMessage(playerid,COLOR_RED,"ERROR: You can send only 1 time's per 1 Minute.");
new level;
if((level < 1) || (level > 100000)) return SendClientMessage(playerid,0xFF0000AA,"The MAXIMUM Cash Amount is 1$ - 500.000$);
para[playerid]=strval(inputtext);
ShowPlayerDialog(playerid,1235,DIALOG_STYLE_INPUT, "Send Money","Enter the Cash Amount","Okay","Cancel");
}
if(dialogid==1235&&response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,1235,DIALOG_STYLE_INPUT, "Send Money","Enter the Amount","Okay","Cancel");
GivePlayerMoney(playerid,-strval(inputtext));
GivePlayerMoney(para[playerid],strval(inputtext));
WaitTimeForCMD[playerid]=GetTickCount();
para[playerid]=INVALID_PLAYER_ID;
}