SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/08/2017, 04:46 AM   #21
asri
Big Clucker
 
Join Date: May 2017
Location: Malaysia
Posts: 114
Reputation: 1
Default Re: bug

like this

PHP Code:
public OnPlayerDeath(PIDkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {

            if(
gPlayerCitySelection[PID] == 1)
            {
                
SetPlayerScore(killeridGetPlayerScore(killerid)+1);
                
GivePlayerMoney(killerid4000);
                
scm(killerid, -1"Congratulation!You have gained 4000$ and +2 score.");
                
SetPlayerScore(PIDGetPlayerScore(PID) -1);
                
GivePlayerMoney(PID, -2000);
                
scm(PID, -1"You lost 2000$ because you noob.");
            }

            if(
god_mode[PID] == 1)
            {
               
god_mode[PID] = 0;
            }

            if(
InDM[PID] == true)
            {
               if(
anakko[PID] == 1)
               {
                    
anakko[PID] = 0;
                    
TogglePlayerSpectating(PID1);
                    
PlayerSpectatePlayer(PIDkillerid);
                    
SendClientMessage(PIDSKYBLUE    "You have been killed, you are now spectating your killer.");
                    
SetTimerEx("EndDeathCam"10000false"i"playerid);
               }
               else
               {
                    
TogglePlayerSpectating(PID0);
                    
killstreak(PIDkillerid);
                    
DestroyDynamic3DTextLabel(wanted[killerid]);
                    return 
1;
               }
            }
            
PlayerTextDrawHide(PID,Textdraw0);
            
PlayerTextDrawHide(PID,Textdraw1);
            
PlayerTextDrawHide(PID,Textdraw2);
            
PlayerTextDrawHide(PID,Textdraw3);

            
GameTextForPlayer(playerid,"~r~wasted",20004);
            
gPlayerHasCitySelected[PID] = 0;
            
anakko[PID] = 1;
            
ClearAnimations(PID);
            
rBit2_Set(UnderWaterPIDfalse);
            return 
1;
    }
    else 
printf("OnPlayerDeath: playerid: %d, killerid; %d, reason: %s"playeridkilleridreason);
    return 
1;

asri is offline   Reply With Quote
Old 12/08/2017, 06:40 AM   #22
Arthur Kane
Gangsta
 
Join Date: Sep 2012
Posts: 659
Reputation: 29
Default Re: bug

Remove the return 1; under DestroyDynamic3DTextLabel.

You're posting code all over again but you're not explaining if an errors occurring.

What's the problem now?
Arthur Kane is offline   Reply With Quote
Old 12/08/2017, 10:35 AM   #23
asri
Big Clucker
 
Join Date: May 2017
Location: Malaysia
Posts: 114
Reputation: 1
Default Re: bug

the code like this

PHP Code:
public OnPlayerDeath(PIDkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {

            if(
gPlayerCitySelection[PID] == 1)
            {
                
SetPlayerScore(killeridGetPlayerScore(killerid)+1);
                
GivePlayerMoney(killerid4000);
                
scm(killerid, -1"Congratulation!You have gained 4000$ and +2 score.");
                
SetPlayerScore(PIDGetPlayerScore(PID) -1);
                
GivePlayerMoney(PID, -2000);
                
scm(PID, -1"You lost 2000$ because you noob.");
            }
            if(
god_mode[PID] == 1)
            {
               
god_mode[PID] = 0;
            }

            if(
InDM[playerid] == true)
            {
                        
killstreak(playeridkillerid);
                        
DestroyDynamic3DTextLabel(wanted[playerid]);
                        return 
1;
            }
            
PlayerTextDrawHide(PID,Textdraw0);
            
PlayerTextDrawHide(PID,Textdraw1);
            
PlayerTextDrawHide(PID,Textdraw2);
            
PlayerTextDrawHide(PID,Textdraw3);

            
GameTextForPlayer(playerid,"~r~wasted",20004);
            
gPlayerHasCitySelected[PID] = 0;
            
ClearAnimations(PID);
            
rBit2_Set(UnderWaterPIDfalse);
            return 
1;
    }
    else 
printf("OnPlayerDeath: playerid: %d, killerid; %d, reason: %s"playeridkilleridreason);
    return 
1;

but the gametext not show.when i go to dm mode.the spawn place not in shamal


it like conflict with other spawn place
asri is offline   Reply With Quote
Old 12/08/2017, 09:46 PM   #24
asri
Big Clucker
 
Join Date: May 2017
Location: Malaysia
Posts: 114
Reputation: 1
Default Re: bug

Anyone
asri is offline   Reply With Quote
Old 13/08/2017, 08:32 AM   #25
asri
Big Clucker
 
Join Date: May 2017
Location: Malaysia
Posts: 114
Reputation: 1
Default Re: bug

help.i dont no to fix conflict spawn freeroam or deathmatach mode
asri is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.