12.06.2015, 07:37
Hello mates,
I have a problem with player vehicle destroying -
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.
I have a problem with player vehicle destroying -
PHP код:
public OnVehicleDeath(vehicleid, killerid)
{
if(masina[vehicleid][vehOwned] == true)
{
new owner = GetPlayeridMid(masina[vehicleid][vehOwner]);
if (IsPlayerConnected(owner)) {
if(killerid != INVALID_PLAYER_ID) {
format( g_szBuffer, sizeof( g_szBuffer ),"{FF8585}•{ffffff} %s ћaidėjas sunaikino jūsų tr. priemonę !", getPlayerName(killerid)); // message to owner who destroyed he's car.
SendClientMessage(owner,-1, g_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_szBuffer, sizeof(g_szBuffer), "{FF8585}•{ffffff} sunaikinote {FF8585}%s{ffffff} ћaidėjo tr. priemonę !", masina[vehicleid][vehOwner]); //message to killerid who destroyed the car
SendClientMessage(killerid,-1, g_szBuffer);
}
}
masina[vehicleid][status] = true;
DestroyVehicle(vehicleid);
}
return 1;
}