05.07.2010, 17:25
still dont work ..
and yes its saves in the file correct..
maybe its some other problem with the code.. here is my whole code for this function:
btw: getname function:
stock GetName(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return PlayerName;
}
and yes its saves in the file correct..
maybe its some other problem with the code.. here is my whole code for this function:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_WALK) { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerVehicleSeat(playerid) == 0) { new CarID = GetPlayerVehicleID(playerid); new string[100]; format(string, sizeof(string),"/Cars/Car(%d).Cfg", CarID); if(!strcmp(GetName(playerid), dini_Get(string, "Owner"), true)) { if(CarInfo[CarID][Engine] == 0) { CarInfo[CarID][Engine] = 1; TogglePlayerControllable(playerid, 1); } } else { SendClientMessage(playerid, Red, "You have no keys for this car."); } } } return 1; } return 1; }
stock GetName(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return PlayerName;
}