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 ); Beep( playerid );
p_AddedEmail{ playerid } = true; 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 ] ) ); 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 ); 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; return 1;

View File

@ -605,7 +605,7 @@ stock VIPToColor( viplvl )
return string; return string;
} }
stock SetPlayerVipLevel( playerid, level, interval = 2592000 ) stock SetPlayerVipLevel( playerid, level, interval = 2592000, bool: credit_assets = true )
{ {
if ( ! IsPlayerConnected( playerid ) ) if ( ! IsPlayerConnected( playerid ) )
return; return;
@ -627,6 +627,8 @@ stock SetPlayerVipLevel( playerid, level, interval = 2592000 )
} }
// give player appropriate notes/items // give player appropriate notes/items
if ( credit_assets )
{
switch ( level ) switch ( level )
{ {
case VIP_REGULAR: case VIP_REGULAR:
@ -665,4 +667,5 @@ stock SetPlayerVipLevel( playerid, level, interval = 2592000 )
SendClientMessageToAdmins( -1, ""COL_PINK"[VIP NOTE]"COL_GREY" %s(%d) needs a House, Vehicle, Garage, Gate and Weed Biz. (/viewnotes)", ReturnPlayerName( playerid ), playerid ); SendClientMessageToAdmins( -1, ""COL_PINK"[VIP NOTE]"COL_GREY" %s(%d) needs a House, Vehicle, Garage, Gate and Weed Biz. (/viewnotes)", ReturnPlayerName( playerid ), playerid );
} }
} }
}
} }