Player's Car Icon doesn't show up :(
#1

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 Floatpx,Floatpy,Floatpz;
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
Reply
#2

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.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)