OnVehicleDeath
#1

Hello mates,

I have a problem with player vehicle destroying -
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    if(
masina[vehicleid][vehOwned] == true)
    {
        new 
owner GetPlayeridMid(masina[vehicleid][vehOwner]);
        if (
IsPlayerConnected(owner)) {
            if(
killerid != INVALID_PLAYER_ID) {
                
formatg_szBuffersizeofg_szBuffer ),"{FF8585}•{ffffff} %s ћaidėjas sunaikino jūsų tr. priemonę !"getPlayerName(killerid)); // message to owner who destroyed he's car.
                
SendClientMessage(owner,-1g_szBuffer);
            } else {
                
SendClientMessage(owner, -1"{FF8585}•{ffffff} jūsų tr. priemonė buvo sunaikinta !"); // if car was destroyed by self or smthg.
            
}
        }
        if(
killerid != INVALID_PLAYER_ID) {
            if(
strcmp(getPlayerName(killerid),masina[vehicleid][vehOwner],true)) {
                
format(g_szBuffersizeof(g_szBuffer), "{FF8585}•{ffffff} sunaikinote {FF8585}%s{ffffff} ћaidėjo tr. priemonę !"masina[vehicleid][vehOwner]); //message to killerid who destroyed the car
                
SendClientMessage(killerid,-1g_szBuffer);
            }
        }    
        
masina[vehicleid][status] = true;
        
DestroyVehicle(vehicleid);
    }
    return 
1;

I don't get any messages but when I'am in car and I destroyed it show's my name, but I dont remember about - masina[vehicleid][status] = true; if this parts works when I destroy it and get a message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)