Problems with Car destruction Infos.
#1

Hey guys! I'm posting there because i have a problem with my Car Destruction information. It is supposed to tell on the main chat:
'someone''s 'vehiclename' has been destroyed By 'someone' But, it says:
0 's 0 Has Been Destroyed By 255. I wonder What's wrong :\ I got no warnings for it on my script file.

Here are the lines:
//-------------------------------------------------------------------------
public OnVehicleDeath(vehicleid, killerid)
{
new string[40];
new playerid;
if(killerid == INVALID_PLAYER_ID) format(string, sizeof(string), " %d 's %d was destroyed.",playerid, GetPlayerVehicleName (playerid));
else format(string, sizeof(string), " %d 's %d Was Destroyed By %d", playerid, GetPlayerVehicleName(playerid), killerid);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
return 1;
}

//---------------------------------------------------------------------------



What's wrong so the player's names and vehicles names don't show up?


Thanks :P

I attached a screen of my problem.
Reply
#2

sounds like you showing id's and not names

is there any GetPlayerName?

Do you have a GetVehicleModelID?
Reply
#3

W8, im modifing this.
I wried bad GetPlayerName, that was its problem But the GetplayerVehicleID is still same error.

Look:
C:\Program Files (x86)\Rockstar games\Gta San Andreas\dedicated server\gamemodes\pmkfunserver.pwn(1077) : error 017: undefined symbol "GetVehicleModelID"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Errors.

Hmm. How do i have to define GetVehicleID on this case?
Thanks!

Oh and here's the new script:
//-------------------------------------------------------------------------
public OnVehicleDeath(vehicleid, killerid)
{
new string[40];
new playerid;
GetPlayerName (playerid);
GetVehicleModelID (vehicleid);
if(killerid == INVALID_PLAYER_ID) format(string, sizeof(string), " %d 's %d was destroyed.",playerid, vehicleid);
else format(string, sizeof(string), " %d 's %d Was Destroyed By %d", playerid, vehicleid, killerid);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
return 1;
}

//---------------------------------------------------------------------------
Reply
#4

wiki:

https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/GetVehicleModel
Reply
#5

ok ill take a look. Thanks!
Reply
#6

hmm. Didn't help that much. The get player vehicle model won't work for my script, would be too many lines! and the GetPlayerVehicleID is to get vehicle's id, but im asking for the vehicle's name... Can you help me? thanks!
Reply
#7

new KillerName[24], PlayerName[24];

GetPlayerName(playerid, PlayerName, 24);
GetPlayerName(killerid, KillerName, 24);

Now after doing that you can use KillerName, and PlayerName to show the name of the player that is in the vehicle and destroys it.
Reply
#8

Nah it's just not working. i'll forget that, it's too complicated. i get the same bug as before.
If you'd like to send me the script of it do it, because i'm not able to do it myself :\ thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)