Weird Letters - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weird Letters (
/showthread.php?tid=89702)
Weird Letters -
Kyle - 03.08.2009
Hello i have a script but its making werird letters
On top
Quote:
new CarOwner[MAX_VEHICLES][MAX_PLAYER_NAME];
new CarNameOwner[MAX_VEHICLES][MAX_PLAYER_NAME];
|
When sumone buys a car
Quote:
new vehicleID = GetPlayerVehicleID(playerid);
|
Quote:
GetPlayerName(playerid, CarOwner[vehicleID], MAX_PLAYER_NAME);
|
Statechange
Quote:
if(PlayerNameIs(playerid, CarNameOwner[vehicleID]) && PurchasedVehicle[GetPlayerVehicleID(playerid)] == 1 && PlayerVehicle[playerid] != GetPlayerVehicleID(playerid))
{
new Owner[24];
new string[156];
RemovePlayerFromVehicle(playerid);
GetPlayerName(playerid,Owner, 24);
SendClientMessage(playerid,COLOR_YELLOW,"This vehicle has been purchased from AutoBahn. You are not the owner");
format(string, sizeof(string), "This vehicle is registered to %s(%d)",CarOwner,playerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
|
Re: Weird Letters -
WrathOfGenesis - 03.08.2009
OnPlayerStateChange
pawn Код:
if(PlayerNameIs(playerid, CarNameOwner[vehicleID]) && PurchasedVehicle[GetPlayerVehicleID(playerid)] == 1 && PlayerVehicle[playerid] != GetPlayerVehicleID(playerid))
{
new Owner[24];
new string[156];
GetPlayerName(playerid,Owner, 24);
SendClientMessage(playerid,COLOR_YELLOW,"This vehicle has been purchased from AutoBahn. You are not the owner");
format(string, sizeof(string), "This vehicle is registered to %s(%d)", CarOwner [ GetPlayervehicleID ( playerid ) ] ,playerid); //THIS LINE
SendClientMessage(playerid, COLOR_YELLOW, string);
RemovePlayerFromVehicle(playerid);
}
Untested but should work or give you the general idea. You didnt implement the variable
Re: Weird Letters -
SiJ - 03.08.2009
Quote:
Originally Posted by KyleSmith
Hello i have a script but its making werird letters
On top
Quote:
new CarOwner[MAX_VEHICLES][MAX_PLAYER_NAME];
new CarNameOwner[MAX_VEHICLES][MAX_PLAYER_NAME];
|
When sumone buys a car
Quote:
new vehicleID = GetPlayerVehicleID(playerid);
|
Quote:
GetPlayerName(playerid, CarOwner[vehicleID], MAX_PLAYER_NAME);
|
Statechange
pawn Код:
if(PlayerNameIs(playerid, CarNameOwner[vehicleID]) && PurchasedVehicle[GetPlayerVehicleID(playerid)] == 1 && PlayerVehicle[playerid] != GetPlayerVehicleID(playerid)) { new Owner[24]; new string[156]; RemovePlayerFromVehicle(playerid); GetPlayerName(playerid,Owner, 24); SendClientMessage(playerid,COLOR_YELLOW,"This vehicle has been purchased from AutoBahn. You are not the owner"); format(string, sizeof(string), "This vehicle is registered to %s(%d)",CarOwner[vehicleid][playerid],playerid); //<============= SendClientMessage(playerid, COLOR_YELLOW, string); } }

|
If I'm not wrong you need to fix line I've marked..
Re: Weird Letters -
Kyle - 03.08.2009
dont get it can u do it.?
Re: Weird Letters -
WrathOfGenesis - 03.08.2009
We just did. Check the line I edited, see whats different and use that instead