do not credit free vips assets

This commit is contained in:
Lorenc Pekaj 2018-11-18 22:41:41 +11:00
parent 1f3c3f4f8c
commit 951a348c44
2 changed files with 39 additions and 36 deletions

View File

@ -73,7 +73,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
Beep( playerid );
p_AddedEmail{ playerid } = true;
SetPlayerVipLevel( playerid, VIP_REGULAR, .interval = 259560 ); // 3 days of vip
SetPlayerVipLevel( playerid, VIP_REGULAR, .interval = 259560, .credit_assets = false ); // 3 days of vip
mysql_single_query( sprintf( "UPDATE `USERS` SET `USED_EMAIL`=1 WHERE `ID`=%d", p_AccountID[ playerid ] ) );
SendGlobalMessage( COLOR_GOLD, "[EMAIL CONFIRMED]"COL_GREY" %s(%d) has confirmed their "COL_GOLD"/email"COL_GREY" and received 3 days of V.I.P!", ReturnPlayerName( playerid ), playerid );
return 1;

View File

@ -605,7 +605,7 @@ stock VIPToColor( viplvl )
return string;
}
stock SetPlayerVipLevel( playerid, level, interval = 2592000 )
stock SetPlayerVipLevel( playerid, level, interval = 2592000, bool: credit_assets = true )
{
if ( ! IsPlayerConnected( playerid ) )
return;
@ -627,6 +627,8 @@ stock SetPlayerVipLevel( playerid, level, interval = 2592000 )
}
// give player appropriate notes/items
if ( credit_assets )
{
switch ( level )
{
case VIP_REGULAR:
@ -666,3 +668,4 @@ stock SetPlayerVipLevel( playerid, level, interval = 2592000 )
}
}
}
}