Player's Car Icon doesn't show up :( - 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: Player's Car Icon doesn't show up :( (
/showthread.php?tid=121657)
Player's Car Icon doesn't show up :( -
aNdReSkKkK - 17.01.2010
Hello there,
I have this timer setup, it works when a player logs in and in his info file the part ownscar==1
needless to say timer is loaded on gamemode init :P
forward OwnCarIcon();
public OwnCarIcon(){
for (new carownedplayer = 0; carownedplayer < MAX_PLAYERS; carownedplayer++){
if (IsPlayerConnected(carownedplayer)){
if(PlayerInfo[carownedplayer][logged] == 1) {
if(PlayerInfo[carownedplayer][ownscar] == 1) {
new Float
px,Float
py,Float
pz;
GetVehiclePos((PlayerInfo[carownedplayer][ownedcar]),ppx,ppy,ppz);
RemovePlayerMapIcon(carownedplayer, CarIcon[carownedplayer]);
SetPlayerMapIcon(carownedplayer, CarIcon[carownedplayer], ppx, ppy,ppz, 1, COLOR_CAR);
}
}
}
}
}
it just doesnt do anything :O
it's supposed to show a Grey Square on radar on player's car position
Re: Player's Car Icon doesn't show up :( -
s0nic - 17.01.2010
Maybe its this:
pawn Код:
GetVehiclePos((PlayerInfo[carownedplayer][ownedcar]),ppx,ppy,ppz);
Notice the ( ) around PlayerInfo[carownedplayer][ownedcar]..so you can just change it to:
pawn Код:
GetVehiclePos(PlayerInfo[carownedplayer][ownedcar],ppx,ppy,ppz);
Or it can be your " CarIcon[carownedplayer] " in your SetPlayerMapIcon as it can be set higher than 100 and 100 is the limit..correct me if im wrong.
Re: Player's Car Icon doesn't show up :( -
aNdReSkKkK - 17.01.2010
FIxed :P
It was my mistake. On Player Discconect I was setting the player car ownership as false and then save :P instead of save and then set it to false hehehe thx tho