Need help with the score & money award in my TDM.
#1

Fixed!
Reply
#2

can you show us code where you boy house ?
Reply
#3

I'm using the filterscript ( DynamicApartmentSystem ) For houses.

But this is probably it :



PHP код:
CMD:buyapartment(playeridparams[]) // cmd to buy apartment
{
    for(new 
0sizeof(ApartmentInfo); i++)
    {
        
GetPlayerName(playeridplnamesizeof(plname));
        if(
strcmp(ApartmentInfo[i][sOwner], plnamefalse ) == 0)
        {
            
SendClientMessage(playeridWHITE"You alerdy have apartment!");
            return 
1;
        }
        if(
IsPlayerInRangeOfPoint(playerid3,ApartmentInfo[i][sEnterx], ApartmentInfo[i][sEntery], ApartmentInfo[i][sEnterz]) && ApartmentInfo[i][sOwned] == 0)
        {
            if(
GetPlayerMoney(playerid) > ApartmentInfo[i][sPrice])
            {
                if(
GetPlayerScore(playerid) >= ApartmentInfo[i][sLevel])
                {
                    
strmid(ApartmentInfo[i][sOwner], plname0strlen(plname), 255);
                    
ApartmentInfo[i][sOwned] = 1;
                    
GivePlayerMoney(playerid,-ApartmentInfo[i][sPrice]);
                    
SendClientMessage(playeridWHITE"Congratz on new apartment, type /aphelp to see all commands!");
                    
strmid(ApartmentInfo[i][sOwner], plname0strlen(plname), 255);
                    
LabelIPickup(i);
                    
SaveApartment(i);
                    return 
1;
                }
                else { 
SendClientMessage(playeridGREY"Your level is too low!"); return 1; }
            }
            else { 
SendClientMessage(playeridGREY"You don't have enough't money!"); return 1; }
        }
    }
    return 
1;

Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
            SendDeathMessage(killerid,playerid,reason);
            SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
            GivePlayerMoney(killerid, 2500);
            //playercash = GetPlayerMoney(playerid);
            //if (playercash > 0)  {
               //GivePlayerMoney(killerid, playercash);
               //ResetPlayerMoney(playerid);
     return 1;
}
this one will work, tried it!
Reply
#5

Still get 2500 score

Maybe its something in the old GM cause i use the LVDM from the default gm's of samp.
Reply
#6

Okej it works This was the problem :

PHP код:
//public MoneyGrubScoreUpdate()
//{
    //new CashScore;
    //new name[MAX_PLAYER_NAME];
    //new string[256];
    //for(new i=0; i<MAX_PLAYERS; i++)
    //{
        //if (IsPlayerConnected(i))
        //{
            //GetPlayerName(i, name, sizeof(name));
               //CashScore = GetPlayerMoney(i);
            //SetPlayerScore(i, CashScore);
            //if (CashScore > CashScoreOld)
            //{
                //CashScoreOld = CashScore;
                //format(string, sizeof(string), "$$$ %s is now in the lead $$$", name);
                //SendClientMessageToAll(COLOR_YELLOW, string);
            //}
        //}
    //}
//} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)